]> _ Git - pmi.git/commitdiff
fix #3095 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 1 Oct 2019 13:51:15 +0000 (15:51 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 1 Oct 2019 13:51:15 +0000 (15:51 +0200)
app/Models/Product.php

index 2bf747b4cce82c063e2a7776e4d4d8aee028ed04..bbdbe72b09cec9001dbb3f0ec7a99cde4b92e364 100644 (file)
@@ -300,7 +300,11 @@ class Product extends CubistMagicPageModel
                 if (is_array($val)) {
                     continue;
                 }
-                $option = Json::decodeRecursive($specEntity->options, Json::TYPE_ARRAY)[$val];
+                $options = Json::decodeRecursive($specEntity->options, Json::TYPE_ARRAY);
+                if (!isset($options[$val])) {
+                    continue;
+                }
+                $option = $options[$val];
 
                 $locale = App::getLocale();
                 if (!isset($option[$locale]) || !$option[$locale]) {