From 29f49d2ded89fa562eb863eec23f4ce21c1331b1 Mon Sep 17 00:00:00 2001 From: Lars Strojny Date: Sun, 14 Dec 2008 16:25:37 +0000 Subject: [PATCH] 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. --- ext/standard/tests/file/stream_001.phpt | 2 +- main/streams/streams.c | 10 +++++----- 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; -- 2.50.1