From 03bb395ad84e8e1201a311d042bd1aa9b9642a99 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 17 Dec 2019 12:14:30 +0100 Subject: [PATCH] Update document.php --- htdocs/projet/tasks/document.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/projet/tasks/document.php b/htdocs/projet/tasks/document.php index 827ac810695..3fa4d5c6d7b 100644 --- a/htdocs/projet/tasks/document.php +++ b/htdocs/projet/tasks/document.php @@ -256,11 +256,11 @@ if ($object->id > 0) $morehtmlref.='
'; // Third party - if ($projectstatic->thirdparty->id > 0) { - $morehtmlref .= $langs->trans("ThirdParty") . ': '; - $morehtmlref .= $projectstatic->thirdparty->getNomUrl(1); - $morehtmlref .= ''; - } + $morehtmlref .= $langs->trans("ThirdParty") . ': '; + if (is_object($projectstatic->thirdparty) && $projectstatic->thirdparty->id > 0) { + $morehtmlref .= $projectstatic->thirdparty->getNomUrl(1); + } + $morehtmlref .= ''; } dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param);