e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
318 stars 212 forks source link

fix(#5131): Accurate resource open check when using log file handle #5134

Closed Deltik closed 6 months ago

Deltik commented 6 months ago

Motivation and Context

Fixes: https://github.com/e107inc/e107/issues/5131

Description

Switch the logging file handle check to use is_resource() for correctly identifying whether the file handle is open.

How Has This Been Tested?

New unit test: e107EmailTest::testLogFileHandle()

Types of Changes

Checklist

codeclimate[bot] commented 6 months ago

Code Climate has analyzed commit 688ebdfe and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (80% is the threshold).

This pull request will bring the total coverage in the repository to 38.7% (-0.1% change).

View more on Code Climate.

CaMer0n commented 6 months ago

Great! Thank you @Deltik ! 👍