1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-01 14:30:32 +02:00

[feature/controller] Don't allow a kernel listener to be added with no method

PHPBB3-10864
This commit is contained in:
David King
2012-10-20 17:16:14 -04:00
parent 067a770730
commit 5c86a1660d
2 changed files with 2 additions and 4 deletions

View File

@@ -44,10 +44,7 @@ class phpbb_event_kernel_compiler_pass implements CompilerPassInterface
if (!isset($event['method']))
{
$event['method'] = 'on'.preg_replace(array(
'/(?<=\b)[a-z]/ie',
'/[^a-z0-9]/i'
), array('strtoupper("\\0")', ''), $event['event']);
throw new InvalidArgumentException($user->lang('NO_METHOD_ATTRIBUTE', $id));
}
$definition->addMethodCall('addListenerService', array($event['event'], array($id, $event['method']), $priority));