replace throw new Exception(…) with dol_print_error + exit
This commit is contained in:
parent
5953c3cd38
commit
4ced0bac89
@ -5620,7 +5620,8 @@ abstract class CommonObject
|
|||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs, $conf;
|
global $langs, $conf;
|
||||||
if (!empty(self::TRIGGER_PREFIX) && strpos($triggerName, self::TRIGGER_PREFIX . '_') !== 0) {
|
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.
|
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';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/translate.class.php';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user