Skip to content

Commit 10b32cf

Browse files
Merge branch '3.3' into 3.4
* 3.3: [HttpKernel] DebugHandlersListener should always replace the existing exception handler 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 [Cache] Fix handling of apcu_fetch() edgy behavior 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. [Serializer] DateTimeNormalizer handling of null and empty values (returning null or empty instead of new object) [Console] Improve phpdoc on StyleInterface::ask()
2 parents 17b5962 + 90cb5ca commit 10b32cf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Loader/XliffFileLoader.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,16 +234,20 @@ private function fixXmlLocation($schemaSource, $xmlUri)
234234
{
235235
$newPath = str_replace('\\', '/', __DIR__).'/schema/dic/xliff-core/xml.xsd';
236236
$parts = explode('/', $newPath);
237+
$locationstart = 'file:///';
237238
if (0 === stripos($newPath, 'phar://')) {
238239
$tmpfile = tempnam(sys_get_temp_dir(), 'symfony');
239240
if ($tmpfile) {
240241
copy($newPath, $tmpfile);
241242
$parts = explode('/', str_replace('\\', '/', $tmpfile));
243+
} else {
244+
array_shift($parts);
245+
$locationstart = 'phar:///';
242246
}
243247
}
244248

245249
$drive = '\\' === DIRECTORY_SEPARATOR ? array_shift($parts).'/' : '';
246-
$newPath = 'file:///'.$drive.implode('/', array_map('rawurlencode', $parts));
250+
$newPath = $locationstart.$drive.implode('/', array_map('rawurlencode', $parts));
247251

248252
return str_replace($xmlUri, $newPath, $schemaSource);
249253
}

0 commit comments

Comments
 (0)