]> granicus.if.org Git - php/commitdiff
Fixed bug #53965 <xsl:include> cannot find files w/ relative paths when loaded w...
authorAnatol Belski <ab@php.net>
Tue, 1 Apr 2014 08:07:18 +0000 (10:07 +0200)
committerAnatol Belski <ab@php.net>
Tue, 1 Apr 2014 08:07:18 +0000 (10:07 +0200)
ext/dom/document.c

index 19acff7468e2e180b8a325f075d3b3bbcc4047dd..f105f6d7fe83ced36799094e48907bfe440a0afe 100644 (file)
@@ -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