1
0
Fork 0

Fix return value of ProcessExecutor::getErrorOutput, closes #10054

pull/10065/head
Jordi Boggiano 2021-08-18 14:48:20 +02:00
parent cac4c190f1
commit c5a02a2b58
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 6 additions and 3 deletions

View File

@ -33,8 +33,11 @@ class ProcessExecutor
protected static $timeout = 300; protected static $timeout = 300;
protected $captureOutput; /** @var bool */
protected $errorOutput; protected $captureOutput = false;
/** @var string */
protected $errorOutput = '';
/** @var ?IOInterface */
protected $io; protected $io;
/** /**
@ -111,7 +114,7 @@ class ProcessExecutor
} }
$this->captureOutput = func_num_args() > 3; $this->captureOutput = func_num_args() > 3;
$this->errorOutput = null; $this->errorOutput = '';
// TODO in v3, commands should be passed in as arrays of cmd + args // TODO in v3, commands should be passed in as arrays of cmd + args
if (method_exists('Symfony\Component\Process\Process', 'fromShellCommandline')) { if (method_exists('Symfony\Component\Process\Process', 'fromShellCommandline')) {