fix warning

This commit is contained in:
florian HENRY 2020-01-09 16:26:30 +01:00
parent b3d8a1e76a
commit 83ada939d5
3 changed files with 4 additions and 1 deletions

0
htdocs/conf/conf.php.example Normal file → Executable file
View File

0
htdocs/conf/index.html Normal file → Executable file
View File

View File

@ -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