diff --git a/lib/Cake/Console/ConsoleOutput.php b/lib/Cake/Console/ConsoleOutput.php index fa021b565..5e1ce9bec 100644 --- a/lib/Cake/Console/ConsoleOutput.php +++ b/lib/Cake/Console/ConsoleOutput.php @@ -295,7 +295,9 @@ class ConsoleOutput { * Clean up and close handles */ public function __destruct() { - fclose($this->_output); + if (is_resource($this->_output)) { + fclose($this->_output); + } } }