Fix method_exists when model is not string or object

This commit is contained in:
repat committed 2020-11-19 18:35:14 +13:00
1 parent f337e4f605
commit 06ae76ab16
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);
}