Skip to content
Snippets Groups Projects

Issue #3370580 by esdrasterrero: Deprecated function preg_split() in RouteProvider.php

1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -349,7 +349,7 @@ protected function getRoutesByPath($path) {
// have a case-insensitive match from the incoming path to the lower case
// pattern outlines from \Drupal\Core\Routing\RouteCompiler::compile().
// @see \Drupal\Core\Routing\CompiledRoute::__construct()
$parts = preg_split('@/+@', mb_strtolower($path), -1, PREG_SPLIT_NO_EMPTY);
$parts = !empty($path) ? preg_split('@/+@', mb_strtolower($path), -1, PREG_SPLIT_NO_EMPTY) : [];
$collection = new RouteCollection();
Loading