]> _ Git - cubist_cms-back.git/commitdiff
wait #5141 @1.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 3 Mar 2022 13:07:41 +0000 (14:07 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 3 Mar 2022 13:07:41 +0000 (14:07 +0100)
src/app/Magic/Fields/SelectFromModel.php

index f6ea42d6f14c9feb1112ba5e3fd63ec262f07b20..34909ba942b7b96a4a86ac64e1a9636bb7dc94f0 100644 (file)
@@ -36,6 +36,9 @@ class SelectFromModel extends Model
                     $list = $field->pluck($pluckAttr);
                     $findIds = [];
                     foreach ($list as $id => $value) {
+                        if (!is_string($value)) {
+                            continue;
+                        }
                         if (stristr($value, $searchTerm)) {
                             $findIds[] = $id;
                         }
@@ -49,7 +52,7 @@ class SelectFromModel extends Model
     protected function _preGetDefinition()
     {
         parent::_preGetDefinition();
-        $o=$this->_getOptions();
+        $o = $this->_getOptions();
         $this->setAttribute('options', $o);
     }