From 94356a92da9cb6848d22a413b9f7d5dc32626e3d Mon Sep 17 00:00:00 2001 From: data Date: Tue, 10 Mar 2026 14:13:05 +0100 Subject: [PATCH] fix: Fatal error in mail sender accessing $conf->global Replace $conf->global->MAIN_INFO_SOCIETE_MAIL with getDolGlobalString() to prevent fatal error when constant is not set. This caused the cronjob to hang on the productive server. Co-Authored-By: Claude Opus 4.6 --- class/preisbot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/class/preisbot.class.php b/class/preisbot.class.php index 03adf1f..f8d5861 100755 --- a/class/preisbot.class.php +++ b/class/preisbot.class.php @@ -329,7 +329,7 @@ class PreisBot $body .= '

Diese E-Mail wurde automatisch vom PreisBot-Modul generiert.'; $body .= ''; - $from = getDolGlobalString('MAIN_MAIL_EMAIL_FROM', $conf->global->MAIN_INFO_SOCIETE_MAIL); + $from = getDolGlobalString('MAIN_MAIL_EMAIL_FROM', getDolGlobalString('MAIN_INFO_SOCIETE_MAIL', 'noreply@example.com')); $mail = new CMailFile( $subject,