From bb6523b75d02e59108f9a058690808fd91346cfd Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Tue, 17 Dec 2019 10:49:56 +0100 Subject: [PATCH 1/2] fix task document banner without thirdparty FATAL --- htdocs/projet/tasks/document.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/projet/tasks/document.php b/htdocs/projet/tasks/document.php index b8ff9a175ab..827ac810695 100644 --- a/htdocs/projet/tasks/document.php +++ b/htdocs/projet/tasks/document.php @@ -256,9 +256,11 @@ if ($object->id > 0) $morehtmlref.='
'; // Third party - $morehtmlref.=$langs->trans("ThirdParty").': '; - $morehtmlref.=$projectstatic->thirdparty->getNomUrl(1); - $morehtmlref.=''; + if ($projectstatic->thirdparty->id > 0) { + $morehtmlref .= $langs->trans("ThirdParty") . ': '; + $morehtmlref .= $projectstatic->thirdparty->getNomUrl(1); + $morehtmlref .= ''; + } } dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param); From 03bb395ad84e8e1201a311d042bd1aa9b9642a99 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 17 Dec 2019 12:14:30 +0100 Subject: [PATCH 2/2] 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);