From 447f992b92a6fdedd4dfe211a3891e778be97445 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 26 Apr 2023 21:07:14 +0200 Subject: [PATCH] Fix warning --- htdocs/core/class/notify.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index 8fd4f493eb3..1b40486adad 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -618,8 +618,10 @@ class Notify $arraydefaultmessage = null; $template = $notifcode.'_TEMPLATE'; - $labeltouse = $conf->global->$template; - if (!empty($labeltouse)) $arraydefaultmessage = $formmail->getEMailTemplate($this->db, $object_type.'_send', $user, $outputlangs, 0, 1, $labeltouse); + $labeltouse = getDolGlobalString($template); + if (!empty($labeltouse)) { + $arraydefaultmessage = $formmail->getEMailTemplate($this->db, $object_type.'_send', $user, $outputlangs, 0, 1, $labeltouse); + } if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) { $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object);