From 97945680cf83f67e348bfcacd6c05a10fe0990dd Mon Sep 17 00:00:00 2001 From: daitingting Date: Tue, 16 Jul 2024 09:23:11 +0000 Subject: [PATCH] * [bug] If cols and data are empty, set them as empty array. --- module/pivot/control.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/pivot/control.php b/module/pivot/control.php index b4fa53d4bd..183ac043bf 100644 --- a/module/pivot/control.php +++ b/module/pivot/control.php @@ -85,14 +85,14 @@ class pivot extends control $drillFields = json_decode(base64_decode($drillFields), true); $filterValues = json_decode(base64_decode($filterValues), true); - $this->view->title = $this->lang->pivot->step3->drillView; $cols = $this->pivot->getDrillCols($drill->object); $datas = $this->pivot->getDrillDatas($drill, $drillFields); $result = $this->pivot->processColData($drill->object, $cols, $datas); - $cols = $result['cols']; - $datas = $result['data']; + $cols = isset($result['cols']) ? $result['cols'] : array(); + $datas = isset($result['data']) ? $result['data'] : array(); + $this->view->title = $this->lang->pivot->step3->drillView; $this->view->cols = $cols; $this->view->datas = $datas; $this->display();