1
0
Fork 0

Explicitly cast possible-null to string

pull/5984/head
Jordi Boggiano 2016-12-19 10:31:48 +01:00
parent 1bc8b702ca
commit 1464146629
1 changed files with 4 additions and 4 deletions

View File

@ -217,7 +217,7 @@ class Config
$env = 'COMPOSER_' . strtoupper(strtr($key, '-', '_')); $env = 'COMPOSER_' . strtoupper(strtr($key, '-', '_'));
$val = $this->getComposerEnv($env); $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); $val = Platform::expandPath($val);
if (substr($key, -4) !== '-dir') { if (substr($key, -4) !== '-dir') {
@ -358,9 +358,9 @@ class Config
/** /**
* Replaces {$refs} inside a config string * Replaces {$refs} inside a config string
* *
* @param string $value a config string that can contain {$refs-to-other-config} * @param string|int|null $value a config string that can contain {$refs-to-other-config}
* @param int $flags Options (see class constants) * @param int $flags Options (see class constants)
* @return string * @return string|int|null
*/ */
private function process($value, $flags) private function process($value, $flags)
{ {