mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[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
This commit is contained in:
parent
f46f48a2cf
commit
45a1219886
1 changed files with 2 additions and 9 deletions
|
@ -878,15 +878,8 @@ class phpbb_template_filter extends php_user_filter
|
||||||
if (!preg_match('/^\w+$/', $tag_args))
|
if (!preg_match('/^\w+$/', $tag_args))
|
||||||
{
|
{
|
||||||
// The hook location is wrongly formatted,
|
// The hook location is wrongly formatted,
|
||||||
// if the `DEBUG` constant is set then trigger a warning,
|
global $user;
|
||||||
// otherwise drop the hook and continue
|
trigger_error($user->lang('ERR_TEMPLATE_EVENT_LOCATION', $tag_args), E_USER_ERROR);
|
||||||
if (defined('DEBUG'))
|
|
||||||
{
|
|
||||||
global $user;
|
|
||||||
trigger_error($user->lang('ERR_TEMPLATE_EVENT_LOCATION', $tag_args), E_USER_NOTICE);
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
$location = $tag_args;
|
$location = $tag_args;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue