From e351f7bcd52d33061d695a38ea7e60a84dfb3d8b Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Wed, 20 Aug 2025 16:26:29 +0200 Subject: [PATCH] FIX a Fatal error when a trigger files is not correctly named. --- htdocs/core/class/interfaces.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/core/class/interfaces.class.php b/htdocs/core/class/interfaces.class.php index 5f413215bee..72ceaaaee0b 100644 --- a/htdocs/core/class/interfaces.class.php +++ b/htdocs/core/class/interfaces.class.php @@ -185,6 +185,10 @@ class Interfaces if (empty($modName)) { continue; } + if (!class_exists($modName)) { + dol_syslog(get_class($this)."::run_triggers action=".$action." A trigger file was found with a name interfaces_*_*_".preg_replace('/^interface/', '', strtolower($modName)).".class.php, but the class ".$modName." seems to not exists even after the include of this interface file. Surely a bug in the trigger file or in its name.", LOG_ERR); + continue; + } $objMod = new $modName($this->db); '@phan-var-force DolibarrTriggers $objMod';