Repository navigation
Commit 390a294
committed
Filesystem API: Avoid a fatal error in PclZip when the temporary file cannot be created.
`PclZip::privExtractFileUsingTempFile()` calls `fclose( $v_file )` when it fails to open its temporary file, but `$v_file` is not defined in that function. On PHP 8, `fclose( null )` throws a `TypeError`, so the request dies with a fatal error instead of returning an error with `PCLZIP_ERR_WRITE_OPEN_FAIL`. Nothing has been opened at that point, so the call is removed.
The similar `fclose( $v_file )` in `privAddFileUsingTempFile()` is correct (the file is opened a few lines above) and is left unchanged.
Developed in #15133.
Follow-up to r11056.
Props ExtremsX.
Fixes #66408.
git-svn-id: https://develop.svn.wordpress.org/trunk@65003 602fd350-edb4-49c9-b593-d223f7449a821 parent e0b5e00 commit 390a294
1 file changed
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3981 | 3981 | | |
3982 | 3982 | | |
3983 | 3983 | | |
3984 | | - | |
3985 | 3984 | | |
3986 | 3985 | | |
3987 | 3986 | | |
| |||
0 commit comments