From dbfe71922e22c0c58762bc0260859aa1d108645d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 31 Oct 2012 12:35:52 +0100 Subject: [PATCH] Fix: Avoid warnings --- .../modules/expedition/doc/pdf_expedition_rouget.modules.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php index 0998af96c34..6cf090c02ac 100644 --- a/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php @@ -541,8 +541,9 @@ class pdf_expedition_rouget extends ModelePdfExpedition { // Sender properties $carac_emetteur=''; - // Add internal contact of proposal if defined - $arrayidcontact=$object->$origin->getIdContact('internal','SALESREPFOLL'); + // Add internal contact of origin element if defined + $arrayidcontact=array(); + if (! empty($origin) && is_object($object->$origin)) $arrayidcontact=$object->$origin->getIdContact('internal','SALESREPFOLL'); if (count($arrayidcontact) > 0) { $object->fetch_user($arrayidcontact[0]);