1
0
Fork 0

Merge branch '2.4'

pull/11057/head
Jordi Boggiano 2022-09-13 16:47:09 +02:00
commit c9973cf5a8
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ class ValidatingArrayLoader implements LoaderInterface
$this->config = $config; $this->config = $config;
$this->validateString('name', true); $this->validateString('name', true);
if (isset($config['name']) && ($err = self::hasPackageNamingError($config['name']))) { if (isset($config['name']) && null !== ($err = self::hasPackageNamingError($config['name']))) {
$this->errors[] = 'name : '.$err; $this->errors[] = 'name : '.$err;
} }
@ -326,7 +326,7 @@ class ValidatingArrayLoader implements LoaderInterface
} }
if ($type === 'psr-4') { if ($type === 'psr-4') {
foreach ($typeConfig as $namespace => $dirs) { 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.'\\\\'; $this->errors[] = 'autoload.psr-4 : invalid value ('.$namespace.'), namespaces must end with a namespace separator, should be '.$namespace.'\\\\';
} }
} }