From 522fc024b07a078b9d6f31ffb2ec1ce14dfaaa5d Mon Sep 17 00:00:00 2001 From: Mate Skoblar Date: Tue, 17 Dec 2024 14:03:22 +0100 Subject: [PATCH] Avoids PHP 7.4 notices on null (#1056) Avoids PHP 7.4 notices on null --- Grid/Column/Column.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Grid/Column/Column.php b/Grid/Column/Column.php index 12a1d7f5..1acc0b64 100644 --- a/Grid/Column/Column.php +++ b/Grid/Column/Column.php @@ -526,7 +526,11 @@ public function setData($data) public function getData() { $result = []; - + // PHP 7.4 Notices + if (is_null($this->data)) { + return $result; + } + $hasValue = false; if (isset($this->data['from']) && $this->data['from'] != $this::DEFAULT_VALUE) { $result['from'] = $this->data['from'];