From 8e1b90bc08f9f9b174c22f4207a19baf8a322f52 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 19 Sep 2016 18:47:44 +0200 Subject: [PATCH] Allow reading repo.0 in config command, fixes #5692 --- src/Composer/Command/ConfigCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Command/ConfigCommand.php b/src/Composer/Command/ConfigCommand.php index 65d37da11..404ff8c13 100644 --- a/src/Composer/Command/ConfigCommand.php +++ b/src/Composer/Command/ConfigCommand.php @@ -235,7 +235,7 @@ EOT $rawData = $this->configFile->read(); $data = $this->config->all(); if (preg_match('/^repos?(?:itories)?(?:\.(.+))?/', $settingKey, $matches)) { - if (empty($matches[1])) { + if (!isset($matches[1]) || $matches[1] === '') { $value = isset($data['repositories']) ? $data['repositories'] : array(); } else { if (!isset($data['repositories'][$matches[1]])) {