Fix: PHP 8.0 Warnings

This commit is contained in:
Lucas Marcouiller 2021-10-23 10:57:03 +02:00
parent 622304126e
commit 953a56b08c
3 changed files with 9 additions and 5 deletions

View File

@ -506,6 +506,8 @@ print "</tr>\n";
$totalarray = array();
$totalarray['nbfield'] = 0;
$totalarray['val'] = array('balance'=>0);
$total = array();
$found = 0;
$i = 0;
$lastcurrencycode = '';
@ -714,7 +716,11 @@ foreach ($accounts as $key => $type) {
print '</tr>';
$total[$objecttmp->currency_code] += $solde;
if (empty($total[$objecttmp->currency_code])) {
$total[$objecttmp->currency_code] = $solde;
}else{
$total[$objecttmp->currency_code] += $solde;
}
$i++;
}

View File

@ -1415,12 +1415,12 @@ class DolGraph
$color = 'rgb(' . $newcolor[0] . ', ' . $newcolor[1] . ', ' . $newcolor[2] . ', 0.9)';
$bordercolor = 'rgb(' . $newcolor[0] . ', ' . $newcolor[1] . ', ' . $newcolor[2] . ')';
} else { // We do not use a 'group by'
if (is_array($this->datacolor[$i])) {
if (!empty($this->bordercolor[$i]) && is_array($this->datacolor[$i])) {
$color = 'rgb(' . $this->datacolor[$i][0] . ', ' . $this->datacolor[$i][1] . ', ' . $this->datacolor[$i][2] . ', 0.9)';
} else {
$color = $this->datacolor[$i];
}
if (is_array($this->bordercolor[$i])) {
if (!empty($this->bordercolor[$i]) && is_array($this->bordercolor[$i])) {
$color = 'rgb(' . $this->bordercolor[$i][0] . ', ' . $this->bordercolor[$i][1] . ', ' . $this->bordercolor[$i][2] . ', 0.9)';
} else {
if ($type != 'horizontalBar') {

View File

@ -239,8 +239,6 @@ if ($resql) {
$projectstatic->id = $obj->rowid;
$projectstatic->ref = $obj->ref;
$projectstatic->title = $obj->title;
$projectstatic->dateo = $obj->dateo;
$projectstatic->datep = $obj->datep;
$projectstatic->thirdparty_name = $obj->name;
$projectstatic->status = $obj->status;