From 3cdd03ee0f5f4a83af2b8cd4e26550896ef16ccc Mon Sep 17 00:00:00 2001 From: Nicolas Lambert Date: Thu, 4 Nov 2021 17:36:52 +0100 Subject: [PATCH] Avoid notice Exception in Column::getData() `{% set op = column.data.operator is defined ? column.data.operator : column.defaultOperator %}` call directly Column::getData(). Related to https://github.com/APY/APYDataGridBundle/pull/1047 but not fixed --- Grid/Column/Column.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Grid/Column/Column.php b/Grid/Column/Column.php index db849607..b9e5b120 100644 --- a/Grid/Column/Column.php +++ b/Grid/Column/Column.php @@ -526,6 +526,14 @@ public function setData($data) public function getData() { $result = []; + + if($this->data === null) { + $this->data = [ + 'from' => null, + 'to' => null, + 'operator' => null + ]; + } $hasValue = false; if ($this->data['from'] != $this::DEFAULT_VALUE) {