aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2012-05-10 03:53:30 -0400
committerOleg Pudeyev <oleg@bsdpower.com>2012-11-17 16:39:58 -0500
commit45a1219886b039fbb4bda740accbfbbdbf971022 (patch)
tree1f69063f37032c2c8ee87099a2824e177977f130
parentf46f48a2cfbc923f4e4734dfd200cc6ddbfd689e (diff)
downloadforums-45a1219886b039fbb4bda740accbfbbdbf971022.tar
forums-45a1219886b039fbb4bda740accbfbbdbf971022.tar.gz
forums-45a1219886b039fbb4bda740accbfbbdbf971022.tar.bz2
forums-45a1219886b039fbb4bda740accbfbbdbf971022.tar.xz
forums-45a1219886b039fbb4bda740accbfbbdbf971022.zip
[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
-rw-r--r--phpBB/includes/template/filter.php11
1 files 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;