Skip to content

Commit 3e0b806

Browse files
committed
Merge branch '2.8' into 3.3
* 2.8: fix the Composer API being used [Debug] Always decorate existing exception handlers to deal with fatal errors Enableable ArrayNodeDefinition is disabled for empty configuration Fixing a bug where the dump() function depended on bundle ordering Add nn (Norwegian Nynorsk) translation files, and improve existing file Problem in phar see mergerequest #25579 [Form] Disallow transform dates beyond the year 9999 Copied NO language files to the new NB locale. [Console] Improve phpdoc on StyleInterface::ask()
2 parents e63cd81 + 41f53b3 commit 3e0b806

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Loader/XmlFileLoader.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,16 +573,20 @@ public function validateSchema(\DOMDocument $dom)
573573
$imports = '';
574574
foreach ($schemaLocations as $namespace => $location) {
575575
$parts = explode('/', $location);
576+
$locationstart = 'file:///';
576577
if (0 === stripos($location, 'phar://')) {
577578
$tmpfile = tempnam(sys_get_temp_dir(), 'sf2');
578579
if ($tmpfile) {
579580
copy($location, $tmpfile);
580581
$tmpfiles[] = $tmpfile;
581582
$parts = explode('/', str_replace('\\', '/', $tmpfile));
583+
} else {
584+
array_shift($parts);
585+
$locationstart = 'phar:///';
582586
}
583587
}
584588
$drive = '\\' === DIRECTORY_SEPARATOR ? array_shift($parts).'/' : '';
585-
$location = 'file:///'.$drive.implode('/', array_map('rawurlencode', $parts));
589+
$location = $locationstart.$drive.implode('/', array_map('rawurlencode', $parts));
586590

587591
$imports .= sprintf(' <xsd:import namespace="%s" schemaLocation="%s" />'."\n", $namespace, $location);
588592
}

0 commit comments

Comments
 (0)