Open
Description
Description
The following code:
<?php
$archive = new ZipArchive();
// case 1: $name = '/notexistingfilename'
// case 2: $name = '/notexisting/notexistingfilename'
$res = $archive->open($name, ZipArchive::CREATE);
if ($res !== true) {
// ...........................
}
// ...........
$archive->close();
Resulted in this output:
case 1
ZipArchive::close(): Failure to create temporary file: Permission denied
case 2
ZipArchive::close(): Failure to create temporary file: No such file or directory
But I expected this output instead:
case 1
ZipArchive::open(): Failure to create temporary file: Permission denied
case 2
ZipArchive::open(): Failure to create temporary file: No such file or directory
PHP Version
PHP 8.3.7
Operating System
Fedora 39