PHAR reports invalid error message, when the directory does not exist
| Bug #53898 | PHAR reports invalid error message, when the directory does not exist | ||||
|---|---|---|---|---|---|
| Submitted: | 2011-02-01 09:55 UTC | Modified: | 2011-02-01 15:01 UTC | ||
| From: | nightstorm at tlen dot pl | Assigned: | iliaa (profile) | ||
| Status: | Closed | Package: | PHAR related | ||
| PHP Version: | 5.3.5 | OS: | Arch Linux x86_64 | ||
| Private report: | No | CVE-ID: | None | ||
[2011-02-01 09:55 UTC] nightstorm at tlen dot pl
Description:
------------
When we try to create a PHAR archive, and the directory, where we want to save it does not exist, PHAR complains about invalid file extension, instead of informing that there is a problem with accessing the requested location. This is a bit confusing.
Test script:
---------------
<?php
// assume that "./dummy/" does not exist.
$phar = new Phar('./dummy/archive.phar');
Expected result:
----------------
Cannot create phar './dummy/archive.phar', invalid path in pharbuild.php on line 2
(or something like that)
Actual result:
--------------
UnexpectedValueException: Cannot create phar './dummy/archive.phar', file extension (or combination) not recognised in pharbuild.php on line 2
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2011-02-01 15:01 UTC] iliaa@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: iliaa
[2011-02-01 15:01 UTC] iliaa@php.net