Explicitly cast possible-null to string
parent
1bc8b702ca
commit
1464146629
|
@ -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 string|int|null $value a config string that can contain {$refs-to-other-config}
|
||||
* @param int $flags Options (see class constants)
|
||||
* @return string
|
||||
* @return string|int|null
|
||||
*/
|
||||
private function process($value, $flags)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue