Fix PHP 8 Warning in box member type

This commit is contained in:
daraelmin 2023-05-17 12:32:23 +02:00 committed by GitHub
parent 5dae5b57a0
commit 95a42312ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -88,6 +88,7 @@ class box_members_by_type extends ModeleBoxes
require_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent_type.class.php';
$staticmember = new Adherent($this->db);
$now = dol_now();
$year = date('Y');
$numberyears = getDolGlobalInt("MAIN_NB_OF_YEAR_IN_MEMBERSHIP_WIDGET_GRAPH");
@ -117,13 +118,13 @@ class box_members_by_type extends ModeleBoxes
'text' => $labelstatus,
);
// Up to date
$labelstatus = $staticmember->LibStatut($staticmember::STATUS_VALIDATED, 1, dol_now() + 86400, 1);
$labelstatus = $staticmember->LibStatut($staticmember::STATUS_VALIDATED, 1, $now + 86400, 1);
$this->info_box_contents[$line][] = array(
'td' => 'class="right tdoverflowmax100" width="10%" title="'.dol_escape_htmltag($labelstatus).'"',
'text' => $labelstatus,
);
// Expired
$labelstatus = $staticmember->LibStatut($staticmember::STATUS_VALIDATED, 1, dol_now() - 86400, 1);
$labelstatus = $staticmember->LibStatut($staticmember::STATUS_VALIDATED, 1, $now - 86400, 1);
$this->info_box_contents[$line][] = array(
'td' => 'class="right tdoverflowmax100" width="10%" title="'.dol_escape_htmltag($labelstatus).'"',
'text' => $labelstatus