From 1c7921ed02a2bb225602a21648affd46d0cb86f9 Mon Sep 17 00:00:00 2001 From: Yahnis Elsts Date: Fri, 9 Jun 2017 23:22:46 +0300 Subject: [PATCH] Fix PHP notice "Only variables should be passed by reference". --- src/ChartData.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ChartData.php b/src/ChartData.php index db9d2a1..d4cb93e 100644 --- a/src/ChartData.php +++ b/src/ChartData.php @@ -138,7 +138,7 @@ public function getTotalsByDate() { } public function getPieChartData($label = 'Value', $dayIndex = -1) { - $day = reset(array_keys(array_slice($this->totalsByDate, $dayIndex, 1))); + $day = (array_keys(array_slice($this->totalsByDate, $dayIndex, 1)))[0]; $rows = []; $isAllZero = true;