From fb3cae444818e0efaa9a9cdafbfca921ab90fa1d Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 13 Sep 2022 16:12:28 +0200 Subject: [PATCH] Fix type error in validating array loader when name is not set --- 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 020cd5b1b..265255acf 100644 --- a/src/Composer/Package/Loader/ValidatingArrayLoader.php +++ b/src/Composer/Package/Loader/ValidatingArrayLoader.php @@ -65,7 +65,7 @@ class ValidatingArrayLoader implements LoaderInterface $this->config = $config; $this->validateString('name', true); - if ($err = self::hasPackageNamingError($config['name'])) { + if (isset($config['name']) && ($err = self::hasPackageNamingError($config['name']))) { $this->errors[] = 'name : '.$err; }