jqh 5 anni fa
parent
commit
b88fb562f8
1 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  1. 5 1
      src/Form/Field.php

+ 5 - 1
src/Form/Field.php

@@ -460,7 +460,11 @@ class Field implements Renderable
             $options = $options->toArray();
         }
 
-        $this->options = array_merge($this->options, $options);
+        if (is_array($this->options)) {
+            $this->options = array_merge($this->options, $options);
+        } else {
+            $this->options = $options;
+        }
 
         return $this;
     }