From 83ada939d569e3b6bad563f7ff324a41539f0354 Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Thu, 9 Jan 2020 16:26:30 +0100 Subject: [PATCH 1/2] fix warning --- htdocs/conf/conf.php.example | 0 htdocs/conf/index.html | 0 htdocs/core/class/dolgraph.class.php | 5 ++++- 3 files changed, 4 insertions(+), 1 deletion(-) mode change 100644 => 100755 htdocs/conf/conf.php.example mode change 100644 => 100755 htdocs/conf/index.html diff --git a/htdocs/conf/conf.php.example b/htdocs/conf/conf.php.example old mode 100644 new mode 100755 diff --git a/htdocs/conf/index.html b/htdocs/conf/index.html old mode 100644 new mode 100755 diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index 37f1d6036c6..5b477ace9c8 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -899,7 +899,10 @@ class DolGraph } $legends=array(); - $nblot=count($this->data[0])-1; // -1 to remove legend + $nblot=0; + if (is_array($this->data) && is_array($this->data[0])) { + $nblot=count($this->data[0])-1; // -1 to remove legend + } if ($nblot < 0) dol_syslog('Bad value for property ->data. Must be set by mydolgraph->SetData before calling mydolgrapgh->draw', LOG_WARNING); $firstlot=0; // Works with line but not with bars From e0dfe894f535c9f6e1b781d35b68559db2ddb6f7 Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Thu, 9 Jan 2020 16:45:17 +0100 Subject: [PATCH 2/2] fix warning --- htdocs/conf/conf.php.example | 0 htdocs/conf/index.html | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 htdocs/conf/conf.php.example mode change 100755 => 100644 htdocs/conf/index.html diff --git a/htdocs/conf/conf.php.example b/htdocs/conf/conf.php.example old mode 100755 new mode 100644 diff --git a/htdocs/conf/index.html b/htdocs/conf/index.html old mode 100755 new mode 100644