@@ -16,7 +16,7 @@ parameters:
path: src/Console/ConsoleInput.php
-
message: "#^Property Cake\\\\Console\\\\ConsoleOutput\\:\\:\\$_output \\(resource\\) in isset\\(\\) is not nullable\\.$#"
- count: 1
+ count: 2
path: src/Console/ConsoleOutput.php
message: "#^Unsafe usage of new static\\(\\)\\.$#"
@@ -373,7 +373,7 @@ class ConsoleOutput
public function __destruct()
{
/** @psalm-suppress RedundantCondition */
- if (is_resource($this->_output)) {
+ if (isset($this->_output) && is_resource($this->_output)) {
fclose($this->_output);
}
unset($this->_output);