Skip to content
Snippets Groups Projects
Commit 91b119ee authored by catch's avatar catch
Browse files

Issue #3511966 by tom konda: Replace RegExp with str_ends_with() in .ht.router.php

parent 08c5d9b7
No related branches found
No related tags found
3 merge requests!5423Draft: Resolve #3329907 "Test2",!3478Issue #3337882: Deleted menus are not removed from content type config,!579Issue #2230909: Simple decimals fail to pass validation
Pipeline #473460 passed with warnings
Pipeline: drupal

#473465

    Pipeline: drupal

    #473462

      ...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
      // fallback to index.php. // fallback to index.php.
      do { do {
      $path = dirname($path); $path = dirname($path);
      if (preg_match('/\.php$/', $path) && is_file(__DIR__ . $path)) { if (str_ends_with($path, '.php') && is_file(__DIR__ . $path)) {
      // Discovered that the path contains an existing PHP file. Use that as the // Discovered that the path contains an existing PHP file. Use that as the
      // script to include. // script to include.
      $script = ltrim($path, '/'); $script = ltrim($path, '/');
      ......
      ...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
      // fallback to index.php. // fallback to index.php.
      do { do {
      $path = dirname($path); $path = dirname($path);
      if (preg_match('/\.php$/', $path) && is_file(__DIR__ . $path)) { if (str_ends_with($path, '.php') && is_file(__DIR__ . $path)) {
      // Discovered that the path contains an existing PHP file. Use that as the // Discovered that the path contains an existing PHP file. Use that as the
      // script to include. // script to include.
      $script = ltrim($path, '/'); $script = ltrim($path, '/');
      ......
      0% Loading or .
      You are about to add 0 people to the discussion. Proceed with caution.
      Please register or to comment