mirror of
https://github.com/php/php-src.git
synced 2026-04-28 18:53:33 +02:00
fix bug #29723 (file_get_contents() fails with the file:// wrapper under Win32)
This commit is contained in:
@@ -1454,7 +1454,11 @@ PHPAPI php_stream_wrapper *php_stream_locate_url_wrapper(const char *path, char
|
||||
}
|
||||
/* TODO: curl based streams probably support file:// properly */
|
||||
if (!protocol || !strncasecmp(protocol, "file", n)) {
|
||||
#ifdef PHP_WIN32
|
||||
if (protocol && path[n+1] == '/' && path[n+2] == '/' && path[n+4] != ':') {
|
||||
#else
|
||||
if (protocol && path[n+1] == '/' && path[n+2] == '/' && path[n+3] != '/') {
|
||||
#endif
|
||||
if (options & REPORT_ERRORS) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "remote host file access not supported, %s", path);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user