Unverified Commit de03f6e2 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3540646 by andypost, penyaskito: Fix deprecated readdir() without argument for PHP 8.5

(cherry picked from commit 6c0071f6)
parent 683a48f1
Loading
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -113,11 +113,11 @@ public function registerTestNamespaces() {

    // Expose tests provided by core recipes.
    $base_path = $this->root . '/core/recipes';
    if (@opendir($base_path)) {
      while (($recipe = readdir()) !== FALSE) {
    if ($handle = @opendir($base_path)) {
      while (($recipe = readdir($handle)) !== FALSE) {
        $this->testNamespaces["Drupal\\FunctionalTests\\Recipe\\Core\\$recipe\\"][] = "$base_path/$recipe/tests/src/Functional";
      }
      closedir();
      closedir($handle);
    }

    foreach ($this->testNamespaces as $prefix => $paths) {