From 8596be6a01cf8c640e4cdc627c07f3fb05294bdb Mon Sep 17 00:00:00 2001 From: stephweb Date: Sat, 5 Dec 2020 13:18:31 +0200 Subject: [PATCH] Make compatible with PHP 8.0 --- src/FormBuilder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FormBuilder.php b/src/FormBuilder.php index 6a228ff7..4d0b9caa 100644 --- a/src/FormBuilder.php +++ b/src/FormBuilder.php @@ -1362,7 +1362,7 @@ protected function getModelValueAttribute($name) { $key = $this->transformKey($name); - if (method_exists($this->model, 'getFormValue')) { + if ($this->model !== null && method_exists($this->model, 'getFormValue')) { return $this->model->getFormValue($key); }