Skip to content

Commit

Permalink
Fix phan
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jul 20, 2024
1 parent bf9b797 commit d4a67c0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions htdocs/core/boxes/box_factures_imp.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,9 @@ public function loadBox($max = 5)
while ($line < min($num, $this->max)) {
$objp = $this->db->fetch_object($result);

$datelimite = $this->db->jdate($objp->datelimite);
$date = $this->db->jdate($objp->date);
$datem = $this->db->jdate($objp->tms);
$datelimit = $this->db->jdate(datelimite);
$datelimit = $this->db->jdate($obj->datelimite);

Check warning on line 144 in htdocs/core/boxes/box_factures_imp.php

View workflow job for this annotation

GitHub Actions / phan / Run phan

box_factures_imp.php: PhanTypeExpectedObjectPropAccessButGotNull: Expected an object instance when accessing an instance property, but saw an expression $obj with type null

Check warning on line 144 in htdocs/core/boxes/box_factures_imp.php

View workflow job for this annotation

GitHub Actions / phan / Run phan

box_factures_imp.php: PhanUndeclaredVariable: Variable $obj is undeclared (Did you mean $objp or (global $obj))

$facturestatic->id = $objp->facid;
$facturestatic->ref = $objp->ref;
Expand Down Expand Up @@ -182,7 +181,7 @@ public function loadBox($max = 5)
$late = '';
if ($facturestatic->hasDelay()) {
// @phan-suppress-next-line PhanPluginPrintfVariableFormatString
$late = img_warning(sprintf($l_due_date, dol_print_date($datelimite, 'day', 'tzuserrel')));
$late = img_warning(sprintf($l_due_date, dol_print_date($datelimit, 'day', 'tzuserrel')));
}

$this->info_box_contents[$line][] = array(
Expand All @@ -204,8 +203,8 @@ public function loadBox($max = 5)
);

$this->info_box_contents[$line][] = array(
'td' => 'class="center nowraponall" title="'.dol_escape_htmltag($langs->trans("DateDue").': '.dol_print_date($datelimite, 'day', 'tzuserrel')).'"',
'text' => dol_print_date($datelimite, 'day', 'tzuserrel'),
'td' => 'class="center nowraponall" title="'.dol_escape_htmltag($langs->trans("DateDue").': '.dol_print_date($datelimit, 'day', 'tzuserrel')).'"',
'text' => dol_print_date($datelimit, 'day', 'tzuserrel'),
);

$this->info_box_contents[$line][] = array(
Expand Down

0 comments on commit d4a67c0

Please sign in to comment.