From 45a1219886b039fbb4bda740accbfbbdbf971022 Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Thu, 10 May 2012 03:53:30 -0400 Subject: [PATCH] [feature/template-events] Always commit suicide for invalid event names. Note: suicide happens for syntactically invalid event names, e.g. event names containing punctuation. Event names for which there are no events are silently dropped. PHPBB3-9550 --- phpBB/includes/template/filter.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/phpBB/includes/template/filter.php b/phpBB/includes/template/filter.php index 453e2a05ce..2706eb9040 100644 --- a/phpBB/includes/template/filter.php +++ b/phpBB/includes/template/filter.php @@ -878,15 +878,8 @@ class phpbb_template_filter extends php_user_filter if (!preg_match('/^\w+$/', $tag_args)) { // The hook location is wrongly formatted, - // if the `DEBUG` constant is set then trigger a warning, - // otherwise drop the hook and continue - if (defined('DEBUG')) - { - global $user; - trigger_error($user->lang('ERR_TEMPLATE_EVENT_LOCATION', $tag_args), E_USER_NOTICE); - } - - return; + global $user; + trigger_error($user->lang('ERR_TEMPLATE_EVENT_LOCATION', $tag_args), E_USER_ERROR); } $location = $tag_args;