diff --git a/src/Composer/Config.php b/src/Composer/Config.php index 88e9af73a..2888b8d29 100644 --- a/src/Composer/Config.php +++ b/src/Composer/Config.php @@ -217,7 +217,7 @@ class Config $env = 'COMPOSER_' . strtoupper(strtr($key, '-', '_')); $val = $this->getComposerEnv($env); - $val = rtrim($this->process(false !== $val ? $val : $this->config[$key], $flags), '/\\'); + $val = rtrim((string) $this->process(false !== $val ? $val : $this->config[$key], $flags), '/\\'); $val = Platform::expandPath($val); if (substr($key, -4) !== '-dir') { @@ -358,9 +358,9 @@ class Config /** * Replaces {$refs} inside a config string * - * @param string $value a config string that can contain {$refs-to-other-config} - * @param int $flags Options (see class constants) - * @return string + * @param string|int|null $value a config string that can contain {$refs-to-other-config} + * @param int $flags Options (see class constants) + * @return string|int|null */ private function process($value, $flags) {