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.

This commit is contained in:
Lars Strojny 2008-12-14 16:25:37 +00:00
parent ea7c47c97d
commit 29f49d2ded
2 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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;