Skip to content

Commit 21cc199

Browse files
committed
Changelog excerpt: - When phpMussel encountered a sufficiently zip-like file which isn't a valid zip file (e.g., any non-zip file beginning with the 'PK' header) and consequently attempted to read that non-zip file using ZipHandler, ZipHandler's destructor would generate a fatal error per invalid/uninitialised Zip object when invoked; Fixed.
1 parent 9734b56 commit 21cc199

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,4 +156,8 @@ __*Why "v3.0.0" instead of "v1.0.0?"*__ Prior to phpMussel v3, the "phpMussel Co
156156

157157
### v3.5.3
158158

159+
#### Bugs fixed.
160+
- [2024.11.06]: When phpMussel encountered a sufficiently zip-like file which isn't a valid zip file (e.g., any non-zip file beginning with the 'PK' header) and consequently attempted to read that non-zip file using ZipHandler, ZipHandler's destructor would generate a fatal error per invalid/uninitialised Zip object when invoked; Fixed. *Refer [#242](https://github.com/phpMussel/phpMussel/issues/242).*
161+
162+
#### Other changes.
159163
- [2024.11.06]: Added PHP 8.4 to workflows.

src/ZipHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* License: GNU/GPLv2
99
* @see LICENSE.txt
1010
*
11-
* This file: Zip handler (last modified: 2021.07.10).
11+
* This file: Zip handler (last modified: 2024.11.06).
1212
*/
1313

1414
namespace phpMussel\Core;
@@ -56,7 +56,7 @@ public function __construct($Pointer)
5656
}
5757

5858
$this->ZipObject = new \ZipArchive();
59-
if (!$this->ZipObject->open($Pointer)) {
59+
if ($this->ZipObject->open($Pointer) !== true) {
6060
$this->ErrorState = 2;
6161
return;
6262
}

0 commit comments

Comments
 (0)