Skip to content

Commit 06ae76a

Browse files
committed
Fix method_exists when model is not string or object
1 parent f337e4f commit 06ae76a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/FormBuilder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,7 @@ protected function getModelValueAttribute($name)
13621362
{
13631363
$key = $this->transformKey($name);
13641364

1365-
if (method_exists($this->model, 'getFormValue')) {
1365+
if ((is_string($this->model) || is_object($this->model)) && method_exists($this->model, 'getFormValue')) {
13661366
return $this->model->getFormValue($key);
13671367
}
13681368

0 commit comments

Comments
 (0)