From 703266ae8cf5389e9a77ef8dc35e68ad5656b4ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillaume=20P=C3=A9delagrabe?= Date: Thu, 26 Mar 2020 14:31:51 +0100 Subject: [PATCH] Fix StreamOutput::doWrite(). --- src/Symfony/Component/Console/Output/StreamOutput.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Symfony/Component/Console/Output/StreamOutput.php b/src/Symfony/Component/Console/Output/StreamOutput.php index de5f62404312e..f90a0e7e41758 100644 --- a/src/Symfony/Component/Console/Output/StreamOutput.php +++ b/src/Symfony/Component/Console/Output/StreamOutput.php @@ -74,8 +74,7 @@ protected function doWrite($message, $newline) $message .= PHP_EOL; } - if (!is_resource($this->stream) || !is_string($message)) { - // should never happen + if (!is_string($message)) { throw new RuntimeException('Unable to write output.'); } @fwrite($this->stream, $message);