summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2011-02-01 14:01:00 +0000
committerIlia Alshanetsky <iliaa@php.net>2011-02-01 14:01:00 +0000
commitbaf5d66614583aa15de8b9bc1f469ec9a3b2a216 (patch)
tree6c8da18eb54b6e6dcad89c8fe0d49259107069a9
parent973ca132a4dd938f8400a35fa55b832f2b1f102a (diff)
downloadphp-git-baf5d66614583aa15de8b9bc1f469ec9a3b2a216.tar.gz
Fixed bug #53898 (PHAR reports invalid error message, when the directory does not exist).
-rw-r--r--ext/phar/phar.c2
-rw-r--r--ext/phar/tests/bug46032.phpt2
-rw-r--r--ext/phar/tests/phar_construct_invalidurl.phpt2
-rw-r--r--ext/phar/tests/zip/odt.phpt2
4 files changed, 4 insertions, 4 deletions
diff --git a/ext/phar/phar.c b/ext/phar/phar.c
index 08b74f8665..9026be202d 100644
--- a/ext/phar/phar.c
+++ b/ext/phar/phar.c
@@ -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;
diff --git a/ext/phar/tests/bug46032.phpt b/ext/phar/tests/bug46032.phpt
index 5a88d5b426..7700e9b6f8 100644
--- a/ext/phar/tests/bug46032.phpt
+++ b/ext/phar/tests/bug46032.phpt
@@ -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}
diff --git a/ext/phar/tests/phar_construct_invalidurl.phpt b/ext/phar/tests/phar_construct_invalidurl.phpt
index cc1341500a..30a4687289 100644
--- a/ext/phar/tests/phar_construct_invalidurl.phpt
+++ b/ext/phar/tests/phar_construct_invalidurl.phpt
@@ -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===
diff --git a/ext/phar/tests/zip/odt.phpt b/ext/phar/tests/zip/odt.phpt
index 1c903dd9d4..b007d447a8 100644
--- a/ext/phar/tests/zip/odt.phpt
+++ b/ext/phar/tests/zip/odt.phpt
@@ -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===