[php-src] Issue #15763: zipArchive strange behavior
| From: | chaar123 | Date: | Thu, 05 Sep 2024 14:15:05 +0000 |
| Subject: | [php-src] Issue #15763: zipArchive strange behavior | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-247709@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/15763
Author: chaar123
### 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