]> granicus.if.org Git - php/commitdiff
Fixed bug #53898 (PHAR reports invalid error message, when the directory does not...
authorIlia Alshanetsky <iliaa@php.net>
Tue, 1 Feb 2011 14:01:00 +0000 (14:01 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 1 Feb 2011 14:01:00 +0000 (14:01 +0000)
ext/phar/phar.c
ext/phar/tests/bug46032.phpt
ext/phar/tests/phar_construct_invalidurl.phpt
ext/phar/tests/zip/odt.phpt

index 08b74f8665a653cad5ca742d86b00d37b48b1df2..9026be202df3ed5ec3bb1bfd7be2213bc79b58d5 100644 (file)
@@ -1265,7 +1265,7 @@ int phar_open_or_create_filename(char *fname, int fname_len, char *alias, int al
                        if (ext_len == -2) {
                                spprintf(error, 0, "Cannot create a phar archive from a URL like \"%s\". Phar objects can only be created from local files", fname);
                        } else {
-                               spprintf(error, 0, "Cannot create phar '%s', file extension (or combination) not recognised", fname);
+                               spprintf(error, 0, "Cannot create phar '%s', file extension (or combination) not recognised or the directory does not exist", fname);
                        }
                }
                return FAILURE;
index 5a88d5b42615768e1b938e930f050518d0e51aa5..7700e9b6f804d55a8ee1ad4c313d0aa10c521634 100644 (file)
@@ -27,7 +27,7 @@ new phardata('0000000000000000000');
 %string|unicode%(%d) "%smytest"
 %string|unicode%(%d) "%smytest"
 
-Fatal error: Uncaught exception 'UnexpectedValueException' with message 'Cannot create phar '0000000000000000000', file extension (or combination) not recognised' in %sbug46032.php:%d
+Fatal error: Uncaught exception 'UnexpectedValueException' with message 'Cannot create phar '0000000000000000000', file extension (or combination) not recognised or the directory does not exist' in %sbug46032.php:%d
 Stack trace:
 #0 %sbug46032.php(%d): PharData->__construct('000000000000000...')
 #1 {main}
index cc1341500aad11971d490621d295f172fe3f9482..30a4687289ed57bb0269f01186e6bab4c3fbb31e 100644 (file)
@@ -26,5 +26,5 @@ try {
 --EXPECT--
 Cannot create a phar archive from a URL like "http://should.fail.com". Phar objects can only be created from local files
 Cannot create a phar archive from a URL like "http://". Phar objects can only be created from local files
-Cannot create phar 'http:/', file extension (or combination) not recognised
+Cannot create phar 'http:/', file extension (or combination) not recognised or the directory does not exist
 ===DONE===
index 1c903dd9d483d209885af543c2a2361ab68de0ff..b007d447a82d379eef7fc5191d517dea09a750dd 100644 (file)
@@ -31,5 +31,5 @@ phar://%sodt.odt%cmeta.xml
 phar://%sodt.odt%cmimetype
 phar://%sodt.odt%csettings.xml
 phar://%sodt.odt%cstyles.xml
-Cannot create phar '%sodt.odt', file extension (or combination) not recognised
+Cannot create phar '%sodt.odt', file extension (or combination) not recognised or the directory does not exist
 ===DONE===