jqh hace 5 años
padre
commit
b88fb562f8
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  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;
     }