composer update
This commit is contained in:
10
vendor/symfony/console/Output/StreamOutput.php
vendored
10
vendor/symfony/console/Output/StreamOutput.php
vendored
@@ -20,11 +20,11 @@ use Symfony\Component\Console\Formatter\OutputFormatterInterface;
|
||||
*
|
||||
* Usage:
|
||||
*
|
||||
* $output = new StreamOutput(fopen('php://stdout', 'w'));
|
||||
* $output = new StreamOutput(fopen('php://stdout', 'w'));
|
||||
*
|
||||
* As `StreamOutput` can use any stream, you can also use a file:
|
||||
*
|
||||
* $output = new StreamOutput(fopen('/path/to/output.log', 'a', false));
|
||||
* $output = new StreamOutput(fopen('/path/to/output.log', 'a', false));
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
@@ -70,7 +70,11 @@ class StreamOutput extends Output
|
||||
*/
|
||||
protected function doWrite($message, $newline)
|
||||
{
|
||||
if (false === @fwrite($this->stream, $message) || ($newline && (false === @fwrite($this->stream, PHP_EOL)))) {
|
||||
if ($newline) {
|
||||
$message .= PHP_EOL;
|
||||
}
|
||||
|
||||
if (false === @fwrite($this->stream, $message)) {
|
||||
// should never happen
|
||||
throw new RuntimeException('Unable to write output.');
|
||||
}
|
||||
|
Reference in New Issue
Block a user