]> _ Git - fluidbook-toolbox.git/commitdiff
wip #6288 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 21 Sep 2023 16:35:11 +0000 (18:35 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 21 Sep 2023 16:35:11 +0000 (18:35 +0200)
app/Fluidbook/Compiler/Cart.php

index 17cbef8e5611121997465a8063f55a8cf14faaa2..77794c6b6f97852eefdf2a5879f5867898176a45 100644 (file)
@@ -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');
         }