From a30299b103dff4d311a14e4409569659e55a3103 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Thu, 22 Dec 2022 12:48:33 +0100 Subject: [PATCH] Improve compatibility with modern ClassLoader instances Fixes #11234 --- src/Composer/Autoload/AutoloadGenerator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Autoload/AutoloadGenerator.php b/src/Composer/Autoload/AutoloadGenerator.php index 802cf1b52..94f6ac971 100644 --- a/src/Composer/Autoload/AutoloadGenerator.php +++ b/src/Composer/Autoload/AutoloadGenerator.php @@ -1193,7 +1193,7 @@ HEADER; } foreach ((array) $loader as $prop => $value) { - if ($value && 0 === strpos($prop, $prefix)) { + if (is_array($value) && $value && 0 === strpos($prop, $prefix)) { $maps[substr($prop, $prefixLen)] = $value; } }