From dbdf6af8869ee84c87007b64dbb1570c2516cc4a Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 13 Sep 2022 16:46:18 +0200 Subject: [PATCH] Fix type error --- src/Composer/Package/Loader/ValidatingArrayLoader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Package/Loader/ValidatingArrayLoader.php b/src/Composer/Package/Loader/ValidatingArrayLoader.php index cb5e44005..1bcd294b5 100644 --- a/src/Composer/Package/Loader/ValidatingArrayLoader.php +++ b/src/Composer/Package/Loader/ValidatingArrayLoader.php @@ -326,7 +326,7 @@ class ValidatingArrayLoader implements LoaderInterface } if ($type === 'psr-4') { foreach ($typeConfig as $namespace => $dirs) { - if ($namespace !== '' && '\\' !== substr($namespace, -1)) { + if ($namespace !== '' && '\\' !== substr((string) $namespace, -1)) { $this->errors[] = 'autoload.psr-4 : invalid value ('.$namespace.'), namespaces must end with a namespace separator, should be '.$namespace.'\\\\'; } }