summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Strojny <lstrojny@php.net>2008-12-14 16:25:37 +0000
committerLars Strojny <lstrojny@php.net>2008-12-14 16:25:37 +0000
commit29f49d2ded89fa562eb863eec23f4ce21c1331b1 (patch)
tree9c438b8030f979b853f995a0d3ddf44c3d65e7b5
parentea7c47c97d17cae5492e7fb81161e590ed3d7311 (diff)
downloadphp-git-29f49d2ded89fa562eb863eec23f4ce21c1331b1.tar.gz
If a wrapper could not be found it is either a typo or a configuration issue. But in both cases it is critical enough to warn the user.
-rw-r--r--ext/standard/tests/file/stream_001.phpt2
-rwxr-xr-xmain/streams/streams.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/ext/standard/tests/file/stream_001.phpt b/ext/standard/tests/file/stream_001.phpt
index 67a4a6abd3..eece30a2f5 100644
--- a/ext/standard/tests/file/stream_001.phpt
+++ b/ext/standard/tests/file/stream_001.phpt
@@ -13,7 +13,7 @@ echo "Done\n";
--EXPECTF--
bool(true)
-Notice: fopen(): Unable to find the wrapper "file" - did you forget to enable it when you configured PHP? in %s on line %d
+Warning: fopen(): Unable to find the wrapper "file" - did you forget to enable it when you configured PHP? in %s on line %d
Warning: fopen(): file:// wrapper is disabled in the server configuration in %s on line %d
diff --git a/main/streams/streams.c b/main/streams/streams.c
index 704e2ccd20..dd095bba28 100755
--- a/main/streams/streams.c
+++ b/main/streams/streams.c
@@ -1548,8 +1548,8 @@ PHPAPI php_stream_wrapper *php_stream_locate_url_wrapper(const char *path, char
n = sizeof(wrapper_name) - 1;
}
PHP_STRLCPY(wrapper_name, protocol, sizeof(wrapper_name), n);
-
- php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Unable to find the wrapper \"%s\" - did you forget to enable it when you configured PHP?", wrapper_name);
+
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find the wrapper \"%s\" - did you forget to enable it when you configured PHP?", wrapper_name);
wrapperpp = NULL;
protocol = NULL;
@@ -1597,15 +1597,15 @@ PHPAPI php_stream_wrapper *php_stream_locate_url_wrapper(const char *path, char
if (options & STREAM_LOCATE_WRAPPERS_ONLY) {
return NULL;
}
-
+
if (FG(stream_wrappers)) {
- /* The file:// wrapper may have been disabled/overridden */
+ /* The file:// wrapper may have been disabled/overridden */
if (wrapperpp) {
/* It was found so go ahead and provide it */
return *wrapperpp;
}
-
+
/* Check again, the original check might have not known the protocol name */
if (zend_hash_find(wrapper_hash, "file", sizeof("file"), (void**)&wrapperpp) == SUCCESS) {
return *wrapperpp;