Skip to content

Commit 2320ed4

Browse files
committed
Fix bug with deprecation notice
1 parent ff437b2 commit 2320ed4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ private function addDynamicSection(ArrayNodeDefinition $root)
105105
->thenInvalid('Found values for both "route_basepath" and "route_basepaths", use "route_basepaths" instead.')
106106
->end()
107107
->beforeNormalization()
108-
->ifTrue(function ($v) { return isset($v['route_basepath']); })
108+
->ifTrue(function ($v) { return isset($v['route_basepath']) && !is_array($v['route_basepath']); })
109109
->then(function ($v) {
110110
@trigger_error('The route_basepath setting is deprecated as of version 1.4 and will be removed in 2.0. Use route_basepaths instead.', E_USER_DEPRECATED);
111111

Tests/Resources/Fixtures/config/config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323

2424
<persistence>
2525
<phpcr
26-
route-basepath="/cms/routes"
2726
content-basepath="/cms/content"
2827
use-sonata-admin="false"
2928
enable-initializer="true"
3029
>
30+
<route-basepath>/cms/routes</route-basepath>
3131
<route-basepath>/simple</route-basepath>
3232
</phpcr>
3333
</persistence>

0 commit comments

Comments
 (0)