Merge pull request #671 from repat/6.x

Fix method_exists when model is not string or object (PHP8)
This commit is contained in:
Matt Lantz authored and GitHub committed 2020-12-15 10:19:21 -05:00
commit af6e88d7f6
1 file changed
+1 -1
+1 -1
View File
@@ -1362,7 +1362,7 @@ class FormBuilder
{
$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);
}