1
0
Fork 0

Fix type error

pull/11059/head
Jordi Boggiano 2022-09-14 09:48:44 +02:00
parent dbdf6af886
commit d63218c568
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
2 changed files with 2 additions and 2 deletions

View File

@ -271,7 +271,7 @@ class ArrayLoader implements LoaderInterface
} }
if (!empty($config['keywords']) && \is_array($config['keywords'])) { if (!empty($config['keywords']) && \is_array($config['keywords'])) {
$package->setKeywords($config['keywords']); $package->setKeywords(array_map('strval', $config['keywords']));
} }
if (!empty($config['license'])) { if (!empty($config['license'])) {

View File

@ -571,7 +571,7 @@ class ValidatingArrayLoader implements LoaderInterface
continue; continue;
} }
if ($regex && !Preg::isMatch('{^'.$regex.'$}u', $value)) { if ($regex && !Preg::isMatch('{^'.$regex.'$}u', (string) $value)) {
$this->warnings[] = $property.'.'.$key.' : invalid value ('.$value.'), must match '.$regex; $this->warnings[] = $property.'.'.$key.' : invalid value ('.$value.'), must match '.$regex;
unset($this->config[$property][$key]); unset($this->config[$property][$key]);
$pass = false; $pass = false;