diff options
Diffstat (limited to 'main/streams/streams.c')
-rwxr-xr-x | main/streams/streams.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/main/streams/streams.c b/main/streams/streams.c index 96cba10fe5..61a73eebde 100755 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -2184,7 +2184,11 @@ PHPAPI php_stream_wrapper *php_stream_locate_url_wrapper(const char *path, char if (options & REPORT_ERRORS) { /* protocol[n] probably isn't '\0' */ char *protocol_dup = estrndup(protocol, n); - php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s:// wrapper is disabled in the server configuration", protocol_dup); + if (!PG(allow_url_fopen)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s:// wrapper is disabled in the server configuration by allow_url_fopen=0", protocol_dup); + } else { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s:// wrapper is disabled in the server configuration by allow_url_include=0", protocol_dup); + } efree(protocol_dup); } return NULL; |