diff --git a/core/modules/system/tests/modules/theme_test/lib/Drupal/theme_test/EventSubscriber/ThemeTestSubscriber.php b/core/modules/system/tests/modules/theme_test/lib/Drupal/theme_test/EventSubscriber/ThemeTestSubscriber.php index a981206..94f9dfe 100644 --- a/core/modules/system/tests/modules/theme_test/lib/Drupal/theme_test/EventSubscriber/ThemeTestSubscriber.php +++ b/core/modules/system/tests/modules/theme_test/lib/Drupal/theme_test/EventSubscriber/ThemeTestSubscriber.php @@ -37,7 +37,7 @@ public function onRequest(GetResponseEvent $event) { $GLOBALS['theme_test_output'] = theme('more_link', array('url' => 'user', 'title' => 'Themed output generated in a KernelEvents::REQUEST listener')); } $args = explode('/', $request->attributes->get('system_path')); - if ($args[0] == 'user' && $args[1] == 'autocomplete') { + if (strpos($current_path, 'user/autocomplete') === 0) { // Register a fake registry loading callback. If it gets called by // theme_get_registry(), the registry has not been initialized yet. _theme_registry_callback('_theme_test_load_registry', array());