]> _ Git - pmi.git/commitdiff
wip #2936 @0:20
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 12 Aug 2019 10:16:12 +0000 (12:16 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 12 Aug 2019 10:16:12 +0000 (12:16 +0200)
app/Models/Product.php

index b236f681517cb6b26f73c8a8fa640d5bd0599f86..8fa9f25cdb92e210fa52b205f157029a5013aa38 100644 (file)
@@ -282,9 +282,10 @@ class Product extends CubistMagicModel
                 $specValue = $val['first'] . ' ' . __('à') . ' ' . $val['second'] . ' ' . $specEntity->unit;
             } else if ($specEntity->type == 'list') {
                 $option = Json::decodeRecursive($specEntity->options, Json::TYPE_ARRAY)[$val];
+
                 $locale = App::getLocale();
                 if (!isset($option[$locale]) || !$option[$locale]) {
-                    $specValue = $option['fr'];
+                    $specValue = $option['fr'] ?? '';
                 } else {
                     $specValue = $option[$locale];
                 }