Bug #53898 [Opn->Csd]: PHAR reports invalid error message, when the directory does not exist
Edit report at http://bugs.php.net/bug.php?id=53898&edit=1
ID: 53898
Updated by: iliaa@php.net
Reported by: nightstorm at tlen dot pl
Summary: PHAR reports invalid error message, when the
directory does not exist
-Status: Open
+Status: Closed
Type: Bug
Package: PHAR related
Operating System: Arch Linux x86_64
PHP Version: 5.3.5
-Assigned To:
+Assigned To: iliaa
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2011-02-01 15:01:02] iliaa@php.net
Automatic comment from SVN on behalf of iliaa
Revision: http://svn.php.net/viewvc/?view=revision&revision=307915
Log: Fixed bug #53898 (PHAR reports invalid error message, when the
directory does not exist).
------------------------------------------------------------------------
[2011-02-01 09:55:47] 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
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53898&edit=1
Thread (2 messages)