From eafff58a54993c5cada724894630a8484ae324bc Mon Sep 17 00:00:00 2001 From: atm-greg Date: Fri, 6 Mar 2020 11:30:45 +0100 Subject: [PATCH] fix countable warning --- htdocs/core/class/dolgraph.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index 460b425b8aa..d4eb100f221 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -1189,7 +1189,7 @@ class DolGraph $oldstacknum = -1; while ($i < $nblot) // Loop on each serie { - if (count($arrayofgroupslegend[$i]) > 0) { // We used a 'group by' + if (is_array($arrayofgroupslegend[$i]) && count($arrayofgroupslegend[$i]) > 0) { // We used a 'group by' // If we change the stack $newcolor = $this->datacolor[$arrayofgroupslegend[$i]['stacknum']]; if ($oldstacknum == -1 || $arrayofgroupslegend[$i]['stacknum'] != $oldstacknum) {