Skip to content

Commit

Permalink
Fix StreamOutput::doWrite().
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Pédelagrabe committed Mar 26, 2020
1 parent a29ee7c commit cc290fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Symfony/Component/Console/Output/StreamOutput.php
Expand Up @@ -74,10 +74,10 @@ protected function doWrite($message, $newline)
$message .= PHP_EOL;
}

if (false === @fwrite($this->stream, $message)) {
// should never happen
if (!is_resource($this->stream) || !is_string($message)) {
throw new RuntimeException('Unable to write output.');
}
@fwrite($this->stream, $message);

fflush($this->stream);
}
Expand Down

0 comments on commit cc290fc

Please sign in to comment.