From b32a9cc50efd414c7fba243102fde28590efa7e4 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Mon, 1 Oct 2018 09:13:02 +0200 Subject: [PATCH] fix if no project linked --- htdocs/core/class/notify.class.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index 8aaed92372a..d93b3364ecc 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -35,30 +35,30 @@ class Notify * @var int ID */ public $id; - + /** * @var DoliDB Database handler. */ public $db; - + /** * @var string Error string * @see errors */ public $error; - + /** * @var string[] Error codes (or messages) */ public $errors = array(); var $author; - + /** * @var string Ref */ public $ref; - + var $date; var $duree; var $note; @@ -397,7 +397,8 @@ class Notify $outputlangs->setDefaultLang($obj->default_lang); } - $subject = '['.$mysoc->name.']['.$proj->title.'] '.$outputlangs->transnoentitiesnoconv("DolibarrNotification"); + $projtitle=(empty($proj->title)?'':$proj->title); + $subject = '['.$mysoc->name.']['.$projtitle.'] '.$outputlangs->transnoentitiesnoconv("DolibarrNotification"); switch ($notifcode) { case 'BILL_VALIDATE':