iliaa                                    Tue, 01 Feb 2011 14:01:00 +0000

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).

Bug: http://bugs.php.net/53898 (Open) PHAR reports invalid error message, when 
the directory does not exist
      
Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/phar/phar.c
    U   php/php-src/branches/PHP_5_3/ext/phar/tests/bug46032.phpt
    U   
php/php-src/branches/PHP_5_3/ext/phar/tests/phar_construct_invalidurl.phpt
    U   php/php-src/branches/PHP_5_3/ext/phar/tests/zip/odt.phpt
    U   php/php-src/trunk/ext/phar/phar.c
    U   php/php-src/trunk/ext/phar/tests/bug46032.phpt
    U   php/php-src/trunk/ext/phar/tests/phar_construct_invalidurl.phpt
    U   php/php-src/trunk/ext/phar/tests/zip/odt.phpt

Modified: php/php-src/branches/PHP_5_3/ext/phar/phar.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/phar/phar.c        2011-02-01 13:57:06 UTC 
(rev 307914)
+++ php/php-src/branches/PHP_5_3/ext/phar/phar.c        2011-02-01 14:01:00 UTC 
(rev 307915)
@@ -1265,7 +1265,7 @@
                        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;

Modified: php/php-src/branches/PHP_5_3/ext/phar/tests/bug46032.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/phar/tests/bug46032.phpt   2011-02-01 
13:57:06 UTC (rev 307914)
+++ php/php-src/branches/PHP_5_3/ext/phar/tests/bug46032.phpt   2011-02-01 
14:01:00 UTC (rev 307915)
@@ -27,7 +27,7 @@
 %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}

Modified: 
php/php-src/branches/PHP_5_3/ext/phar/tests/phar_construct_invalidurl.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/phar/tests/phar_construct_invalidurl.phpt  
2011-02-01 13:57:06 UTC (rev 307914)
+++ php/php-src/branches/PHP_5_3/ext/phar/tests/phar_construct_invalidurl.phpt  
2011-02-01 14:01:00 UTC (rev 307915)
@@ -26,5 +26,5 @@
 --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===

Modified: php/php-src/branches/PHP_5_3/ext/phar/tests/zip/odt.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/phar/tests/zip/odt.phpt    2011-02-01 
13:57:06 UTC (rev 307914)
+++ php/php-src/branches/PHP_5_3/ext/phar/tests/zip/odt.phpt    2011-02-01 
14:01:00 UTC (rev 307915)
@@ -31,5 +31,5 @@
 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===

Modified: php/php-src/trunk/ext/phar/phar.c
===================================================================
--- php/php-src/trunk/ext/phar/phar.c   2011-02-01 13:57:06 UTC (rev 307914)
+++ php/php-src/trunk/ext/phar/phar.c   2011-02-01 14:01:00 UTC (rev 307915)
@@ -1265,7 +1265,7 @@
                        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;

Modified: php/php-src/trunk/ext/phar/tests/bug46032.phpt
===================================================================
--- php/php-src/trunk/ext/phar/tests/bug46032.phpt      2011-02-01 13:57:06 UTC 
(rev 307914)
+++ php/php-src/trunk/ext/phar/tests/bug46032.phpt      2011-02-01 14:01:00 UTC 
(rev 307915)
@@ -27,7 +27,7 @@
 %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}

Modified: php/php-src/trunk/ext/phar/tests/phar_construct_invalidurl.phpt
===================================================================
--- php/php-src/trunk/ext/phar/tests/phar_construct_invalidurl.phpt     
2011-02-01 13:57:06 UTC (rev 307914)
+++ php/php-src/trunk/ext/phar/tests/phar_construct_invalidurl.phpt     
2011-02-01 14:01:00 UTC (rev 307915)
@@ -26,5 +26,5 @@
 --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===

Modified: php/php-src/trunk/ext/phar/tests/zip/odt.phpt
===================================================================
--- php/php-src/trunk/ext/phar/tests/zip/odt.phpt       2011-02-01 13:57:06 UTC 
(rev 307914)
+++ php/php-src/trunk/ext/phar/tests/zip/odt.phpt       2011-02-01 14:01:00 UTC 
(rev 307915)
@@ -31,5 +31,5 @@
 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===

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to