From ef5a128973a84645c286808f75cece968181ce79 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 15 Mar 2022 15:57:54 +0100 Subject: [PATCH] Fix type error --- src/Composer/Config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Config.php b/src/Composer/Config.php index fe3069f54..3cf0bca89 100644 --- a/src/Composer/Config.php +++ b/src/Composer/Config.php @@ -341,7 +341,7 @@ class Config // numbers with kb/mb/gb support, without env var support case 'cache-files-maxsize': - if (!Preg::isMatch('/^\s*([0-9.]+)\s*(?:([kmg])(?:i?b)?)?\s*$/i', $this->config[$key], $matches)) { + if (!Preg::isMatch('/^\s*([0-9.]+)\s*(?:([kmg])(?:i?b)?)?\s*$/i', (string) $this->config[$key], $matches)) { throw new \RuntimeException( "Could not parse the value of '$key': {$this->config[$key]}" );