summaryrefslogtreecommitdiff
path: root/ext/dom/document.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-04-01 10:07:18 +0200
committerAnatol Belski <ab@php.net>2014-04-01 10:07:18 +0200
commit3cb056f523d470a677a1c7fc186ce2720fece535 (patch)
treeccdc00f1c2c1fdbc2538b4cc4986a5580675bf01 /ext/dom/document.c
parentfca331cae9c229dd52d762222532ba621039030e (diff)
downloadphp-git-3cb056f523d470a677a1c7fc186ce2720fece535.tar.gz
Fixed bug #53965 <xsl:include> cannot find files w/ relative paths when loaded w/ "file://"
Diffstat (limited to 'ext/dom/document.c')
-rw-r--r--ext/dom/document.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/dom/document.c b/ext/dom/document.c
index 19acff7468..f105f6d7fe 100644
--- a/ext/dom/document.c
+++ b/ext/dom/document.c
@@ -1509,6 +1509,12 @@ char *_dom_get_valid_file_path(char *source, char *resolved_path, int resolved_p
if (uri->scheme != NULL) {
/* absolute file uris - libxml only supports localhost or empty host */
+#ifdef PHP_WIN32
+ if (strncasecmp(source, "file://",7) == 0 && ':' == source[8]) {
+ isFileUri = 1;
+ source += 7;
+ } else
+#endif
if (strncasecmp(source, "file:///",8) == 0) {
isFileUri = 1;
#ifdef PHP_WIN32