summaryrefslogtreecommitdiff
path: root/ext/standard/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/url.c')
-rw-r--r--ext/standard/url.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/standard/url.c b/ext/standard/url.c
index 8bd2a99d00..8bbb599e5b 100644
--- a/ext/standard/url.c
+++ b/ext/standard/url.c
@@ -124,6 +124,9 @@ PHPAPI php_url *php_url_parse(char *str)
if (*(e+2) == '/') {
s = e + 3;
+ if (!strncasecmp("file", ret->scheme, sizeof("file"))) {
+ goto nohost;
+ }
} else {
s = e + 1;
if (!strncasecmp("file", ret->scheme, sizeof("file"))) {