diff options
author | David King <imkingdavid@gmail.com> | 2012-10-20 17:16:14 -0400 |
---|---|---|
committer | David King <imkingdavid@gmail.com> | 2012-11-16 16:25:12 -0500 |
commit | 5c86a1660d436cf16448ae6c978237833e3e86b7 (patch) | |
tree | 0e7623b0ef2253a675b06b8391415de323cfc2a5 /phpBB/includes | |
parent | 067a77073015adf56fb3730417ac2a6d62ce454c (diff) | |
download | forums-5c86a1660d436cf16448ae6c978237833e3e86b7.tar forums-5c86a1660d436cf16448ae6c978237833e3e86b7.tar.gz forums-5c86a1660d436cf16448ae6c978237833e3e86b7.tar.bz2 forums-5c86a1660d436cf16448ae6c978237833e3e86b7.tar.xz forums-5c86a1660d436cf16448ae6c978237833e3e86b7.zip |
[feature/controller] Don't allow a kernel listener to be added with no method
PHPBB3-10864
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/event/kernel_compiler_pass.php | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/phpBB/includes/event/kernel_compiler_pass.php b/phpBB/includes/event/kernel_compiler_pass.php index 18b6661cd4..9a650bc404 100644 --- a/phpBB/includes/event/kernel_compiler_pass.php +++ b/phpBB/includes/event/kernel_compiler_pass.php @@ -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)); |