php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nightstorm at tlen dot pl
New email:
PHP Version: OS:

 

 [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 commitsRelated reports
 [2011-02-01 15:01 UTC] iliaa@php.net
Automatic comment from SVN on behalf of iliaa
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=307915
Log: Fixed bug #53898 (PHAR reports invalid error message, when the directory does not exist).
 [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
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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 11:01:29 2024 UTC