Skip to content
This repository
Browse code

Merge pull request #3319 from dogmatic69/patch-1

Fix closing non resource
commit e9c9e9697d275e0e15277d21e23edbf975443425 2 parents b9b1e85 + 5ac6028
Mark Story authored

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. 4  lib/Cake/Console/ConsoleOutput.php
4  lib/Cake/Console/ConsoleOutput.php
@@ -295,7 +295,9 @@ public function outputAs($type = null) {
295 295
  * Clean up and close handles
296 296
  */
297 297
 	public function __destruct() {
298  
-		fclose($this->_output);
  298
+		if (is_resource($this->_output)) {
  299
+			fclose($this->_output);
  300
+		}
299 301
 	}
300 302
 
301 303
 }

0 notes on commit e9c9e96

Please sign in to comment.
Something went wrong with that request. Please try again.