From 0469be8f7fdd4b6ed11858fd55aac6a204347f8e Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 21 Sep 2023 18:35:11 +0200 Subject: [PATCH] wip #6288 @0.25 --- app/Fluidbook/Compiler/Cart.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Fluidbook/Compiler/Cart.php b/app/Fluidbook/Compiler/Cart.php index 17cbef8e5..77794c6b6 100644 --- a/app/Fluidbook/Compiler/Cart.php +++ b/app/Fluidbook/Compiler/Cart.php @@ -134,7 +134,6 @@ trait Cart } - public function writeMIFCart() { $this->lessVariables['import-cart-styles'] = 'mif'; @@ -221,7 +220,9 @@ trait Cart foreach ($this->config->basketReferences as $ref => $data) { $dest = $cdir . $ref . '.jpg'; if (!file_exists($dest)) { - copy($data['img'], $dest); + if (!@copy($data['img'], $dest)) { + $dest = $this->wdir . '/default.jpg'; + } } $this->vdir->copy($dest, 'data/commerce/' . $ref . '.jpg'); } -- 2.39.5