From f1d451eb12b9aa0f4199c438bea4d087900eda3d Mon Sep 17 00:00:00 2001 From: Alexis Algoud Date: Tue, 11 Jul 2017 23:06:33 +0200 Subject: [PATCH 1/3] FIX empty thirdparty getNomUrl() call without thirdparty --- htdocs/projet/tasks/task.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index f85b5071de1..f936cddd4e9 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -458,9 +458,11 @@ if ($id > 0 || ! empty($ref)) $morehtmlref.='
'; // Third party - $morehtmlref.=$langs->trans("ThirdParty").': '; - $morehtmlref.=$projectstatic->thirdparty->getNomUrl(1); - $morehtmlref.=''; + if(!empty($projectstatic->thirdparty)) { + $morehtmlref.=$langs->trans("ThirdParty").': '; + $morehtmlref.=$projectstatic->thirdparty->getNomUrl(1); + $morehtmlref.=''; + } } dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param); From 7079e6d4bc38f120ac46ff2a672fec83d8a2647f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 13 Jul 2017 14:29:47 +0200 Subject: [PATCH 2/3] Update task.php --- htdocs/projet/tasks/task.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index f936cddd4e9..2a30b326da6 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -461,8 +461,8 @@ if ($id > 0 || ! empty($ref)) if(!empty($projectstatic->thirdparty)) { $morehtmlref.=$langs->trans("ThirdParty").': '; $morehtmlref.=$projectstatic->thirdparty->getNomUrl(1); - $morehtmlref.=''; } + $morehtmlref.=''; } dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param); From cbd9adc052b09b2d3c1535ea694943ba66d6e357 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 13 Jul 2017 14:30:50 +0200 Subject: [PATCH 3/3] Update task.php --- htdocs/projet/tasks/task.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index 2a30b326da6..42b0a3adbea 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -458,8 +458,8 @@ if ($id > 0 || ! empty($ref)) $morehtmlref.='
'; // Third party - if(!empty($projectstatic->thirdparty)) { - $morehtmlref.=$langs->trans("ThirdParty").': '; + $morehtmlref.=$langs->trans("ThirdParty").': '; + if (!empty($projectstatic->thirdparty)) { $morehtmlref.=$projectstatic->thirdparty->getNomUrl(1); } $morehtmlref.='';