Merge pull request #671 from repat/6.x
Fix method_exists when model is not string or object (PHP8)
This commit is contained in:
1 file changed
+1
-1
+1
-1
@@ -1362,7 +1362,7 @@ class FormBuilder
|
|||||||
{
|
{
|
||||||
$key = $this->transformKey($name);
|
$key = $this->transformKey($name);
|
||||||
|
|
||||||
if (method_exists($this->model, 'getFormValue')) {
|
if ((is_string($this->model) || is_object($this->model)) && method_exists($this->model, 'getFormValue')) {
|
||||||
return $this->model->getFormValue($key);
|
return $this->model->getFormValue($key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user