From 4ced0bac8965f4ca1cf54a4cb291d025aaa6808f Mon Sep 17 00:00:00 2001 From: atm-florian Date: Thu, 7 Apr 2022 14:39:14 +0200 Subject: [PATCH] =?UTF-8?q?replace=20throw=20new=20Exception(=E2=80=A6)=20?= =?UTF-8?q?with=20dol=5Fprint=5Ferror=20+=20exit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/core/class/commonobject.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index b1f7997b4f7..6713157c78f 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -5620,7 +5620,8 @@ abstract class CommonObject // phpcs:enable global $langs, $conf; if (!empty(self::TRIGGER_PREFIX) && strpos($triggerName, self::TRIGGER_PREFIX . '_') !== 0) { - throw new Exception('The trigger "' . $triggerName . '" does not start with "' . self::TRIGGER_PREFIX . '_" as required.'); + dol_print_error('', 'The trigger "' . $triggerName . '" does not start with "' . self::TRIGGER_PREFIX . '_" as required.'); + exit; } if (!is_object($langs)) { // If lang was not defined, we set it. It is required by run_triggers. include_once DOL_DOCUMENT_ROOT.'/core/class/translate.class.php';