]> _ Git - pmi.git/commitdiff
wip #3510 @0:10
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 24 Mar 2020 09:44:44 +0000 (10:44 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 24 Mar 2020 09:44:44 +0000 (10:44 +0100)
app/Models/Product.php

index 3f31f3b817e6f2bb5373df202be0ad9fb2d1e3b5..e78bbcb39f767ef9095b55b0e09c38c51de8123f 100644 (file)
@@ -324,6 +324,9 @@ class Product extends CubistMagicPageModel
             } else if ($specEntity->type === 'mlist') {
                 $options = Json::decodeRecursive($specEntity->options, Json::TYPE_ARRAY);
                 $thisSpecs = [];
+                if (!is_array($val)) {
+                    $val = [$val];
+                }
                 foreach ($val as $v) {
                     $r = $this->_optionValue($options, $v);
                     if ($r === null) {