From 73439242ba95126490c87098fc88d4b77cd7e8fd Mon Sep 17 00:00:00 2001 From: Maciej Holyszko <14310995+falkenhawk@users.noreply.github.com> Date: Thu, 18 May 2023 14:33:25 +0200 Subject: [PATCH] tests: fix log test throwing fatal error when resource is lost or not set --- tests/Zend/Log/Filter/ChainingTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/Zend/Log/Filter/ChainingTest.php b/tests/Zend/Log/Filter/ChainingTest.php index f49377386..8b3fc2075 100644 --- a/tests/Zend/Log/Filter/ChainingTest.php +++ b/tests/Zend/Log/Filter/ChainingTest.php @@ -65,7 +65,9 @@ public function setUp() public function tearDown() { - fclose($this->log); + if ($this->log) { + fclose($this->log); + } } public function testFilterAllWriters()