Skip to content

Commit a2b06d6

Browse files
committed
Merge branch '2.2'
* 2.2: Fix default value handling for multi-value options [HttpKernel] truncate profiler token to 6 chars (see #7665) Disabled APC on Travis for PHP 5.5+ as it is not available [HttpFoundation] do not use server variable PATH_INFO because it is already decoded and thus symfony is fragile to double encoding of the path Fix download over SSL using IE < 8 and binary file response [Console] Fix merging of application definition, fixes #7068, replaces #7158 [HttpKernel] fixed the Kernel when the ClassLoader component is not available (closes #7406) fixed output of bag values [Yaml] improved boolean naming ($notEOF -> !$EOF) [Yaml] fixed handling an empty value [Routing][XML Loader] Add a possibility to set a default value to null [Console] fixed handling of "0" input on ask The /e modifier for preg_replace() is deprecated in PHP 5.5; replace with preg_replace_callback() fixed handling of "0" input on ask [HttpFoundation] Fixed bug in key searching for NamespacedAttributeBag [Form] DateTimeToRfc3339Transformer use proper transformation exteption in reverse transformation Update PhpEngine.php [PropertyAccess] Add objectives to pluralMap [Security] Removed unused var [HttpFoundation] getClientIp is fixed. Conflicts: src/Symfony/Component/Console/Tests/Command/CommandTest.php src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php src/Symfony/Component/HttpFoundation/Request.php src/Symfony/Component/HttpKernel/Kernel.php
2 parents fab2e8a + 492e441 commit a2b06d6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

DependencyInjection/Compiler/RegisterKernelListenersPass.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ public function process(ContainerBuilder $container)
3333
}
3434

3535
if (!isset($event['method'])) {
36-
$event['method'] = 'on'.preg_replace(array(
37-
'/(?<=\b)[a-z]/ie',
38-
'/[^a-z0-9]/i'
39-
), array('strtoupper("\\0")', ''), $event['event']);
36+
$event['method'] = 'on'.preg_replace_callback(array(
37+
'/(?<=\b)[a-z]/i',
38+
'/[^a-z0-9]/i',
39+
), function ($matches) { return strtoupper($matches[0]); }, $event['event']);
40+
$event['method'] = preg_replace('/[^a-z0-9]/i', '', $event['method']);
4041
}
4142

4243
$definition->addMethodCall('addListenerService', array($event['event'], array($id, $event['method']), $priority));

0 commit comments

Comments
 (0)