Commit b8561b81 authored by catch's avatar catch
Browse files

Issue #3239294 by alexpott, daffie, andypost: Passing NULL to the limit...

Issue #3239294 by alexpott, daffie, andypost: Passing NULL to the limit argument of preg_split triggers a deprecation in PHP 8.1
parent 7a1bb9f5
Loading
Loading
Loading
Loading
+1 −1
Changes for core/lib/Drupal/Core/Routing/RouteProvider.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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), NULL, PREG_SPLIT_NO_EMPTY);
    $parts = preg_split('@/+@', mb_strtolower($path), -1, PREG_SPLIT_NO_EMPTY);

    $collection = new RouteCollection();

+1 −1
Changes for core/modules/search/search.module: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -506,7 +506,7 @@ function _search_find_match_with_simplify($key, $text, $boundary, $langcode = NU
  }

  // Split $text into words, keeping track of where the word boundaries are.
  $words = preg_split('/' . $boundary . '+/u', $text, NULL, PREG_SPLIT_OFFSET_CAPTURE);
  $words = preg_split('/' . $boundary . '+/u', $text, -1, PREG_SPLIT_OFFSET_CAPTURE);
  // Add an entry pointing to the end of the string, for the loop below.
  $words[] = ['', strlen($text)];