fix php warning in dolGraph class (#31911)
* fix php warning in dolGraph class * remove useless test --------- Co-authored-by: Hystepik <lmarcouiller@nltechno.com>
This commit is contained in:
parent
615bc3143c
commit
0507db75b5
1 changed files with 4 additions and 3 deletions
|
|
@ -782,6 +782,9 @@ class DolGraph
|
|||
{
|
||||
// phpcs:enable
|
||||
$max = $this->GetMaxValueInData();
|
||||
if (!isset($max)) {
|
||||
$max = 0;
|
||||
}
|
||||
if ($max != 0) {
|
||||
$max++;
|
||||
}
|
||||
|
|
@ -792,9 +795,7 @@ class DolGraph
|
|||
}
|
||||
|
||||
$res = 0;
|
||||
if (is_numeric($max)) {
|
||||
$res = ceil($max / $factor) * $factor;
|
||||
}
|
||||
$res = ceil($max / $factor) * $factor;
|
||||
|
||||
//print "max=".$max." res=".$res;
|
||||
return (int) $res;
|
||||
|
|
|
|||
Loading…
Reference in a new issue