Skip to content

Commit

Permalink
Protect product object for line label
Browse files Browse the repository at this point in the history
  • Loading branch information
lvessiller-opendsi committed Feb 20, 2025
1 parent 41e5452 commit 5911d7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion htdocs/core/class/commonobject.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -5218,7 +5218,7 @@ public function printOriginLine($line, $var, $restrictlist = '', $defaulttpldir
}
$productstatic = $line->product;

$this->tpl['label'] .= $productstatic->getNomUrl(1);
$this->tpl['label'] .= (is_object($productstatic) ? $productstatic->getNomUrl(1) : $line->ref);
$this->tpl['label'] .= ' - '.(!empty($line->label) ? $line->label : $line->product_label);
// Dates
if ($line->product_type == 1 && ($date_start || $date_end)) {
Expand Down

0 comments on commit 5911d7d

Please sign in to comment.