Merge pull request #12829 from atm-florian/11.0

Fix Warning
This commit is contained in:
Laurent Destailleur 2020-01-13 11:39:05 +01:00 committed by GitHub
commit ce17f65b08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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