From 5911d7d0c00aad720b22928789e3d8432c9aa6b3 Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Thu, 20 Feb 2025 08:21:50 +0100 Subject: [PATCH] Protect product object for line label --- htdocs/core/class/commonobject.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 807c5f37bfc..085b77dd532 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -5218,7 +5218,7 @@ abstract class CommonObject } $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)) {