diff --git a/htdocs/core/tpl/card_presend.tpl.php b/htdocs/core/tpl/card_presend.tpl.php index f3d6e40fa6a..cec84a2a35d 100644 --- a/htdocs/core/tpl/card_presend.tpl.php +++ b/htdocs/core/tpl/card_presend.tpl.php @@ -261,7 +261,7 @@ if ($action == 'presend') { $liste['thirdparty'] = $fuser->getFullName($outputlangs)." <".$fuser->email.">"; } else { // For example if element is project - if (!empty($object->socid) && $object->socid > 0 && !is_object($object->thirdparty) && method_exists($object, 'fetch_thirdparty')) { + if (property_exists($object, 'socid') && !empty($object->socid) && $object->socid > 0 && !is_object($object->thirdparty) && method_exists($object, 'fetch_thirdparty')) { $object->fetch_thirdparty(); } if (is_object($object->thirdparty)) {