[wp-trac] [WordPress Trac] #52018: Zip Module 2.8.2 - class-pclzip fatal error with PHP 8.0
WordPress Trac
noreply at wordpress.org
Tue Feb 16 17:15:43 UTC 2021
#52018: Zip Module 2.8.2 - class-pclzip fatal error with PHP 8.0
-------------------------------------------------+-------------------------
Reporter: fierevere | Owner:
| SergeyBiryukov
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: 5.6.2
Component: Filesystem API | Version: 5.6
Severity: normal | Resolution:
Keywords: php8 has-patch needs-unit-tests | Focuses:
commit |
-------------------------------------------------+-------------------------
Changes (by SergeyBiryukov):
* keywords: php8 has-patch needs-unit-tests => php8 has-patch needs-unit-
tests commit
Comment:
Replying to [comment:8 jrf]:
> The current patch changes the parameter type for `$p_string` from
`string` to `bool`. While this is also done on failure by the call to
`fread()` this makes the method unstable and could cause unintended side-
effects.
Thanks for the review! While technically true, in my testing the patch
does not make any functionality changes other than avoiding a fatal error,
because, as you've noted, `fread()` also returns `false` on failure.
I think similar changes should also be applied to other similar fragments
of the file, see [attachment:"52018.diff"].
I agree it would be great to add tests for this, but I don't see it as a
blocker for 5.6.2.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52018#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list