8000 Problem in phar by betzholz · Pull Request #25579 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Problem in phar #25579

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fabbot
  • Loading branch information
Boris Betzholz committed Dec 23, 2017
commit 5a608e61a46fad99ac95ddab86898d6ae61a57b0
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ public function validateSchema(\DOMDocument $dom)
$imports = '';
foreach ($schemaLocations as $namespace => $location) {
$parts = explode('/', $location);
$locationstart= 'file:///';
$locationstart = 'file:///';
if (0 === stripos($location, 'phar://')) {
$tmpfile = tempnam(sys_get_temp_dir(), 'symfony');
if ($tmpfile) {
Expand All @@ -608,7 +608,7 @@ public function validateSchema(\DOMDocument $dom)
$parts = explode('/', str_replace('\\', '/', $tmpfile));
}
array_shift($parts);
$locationstart='phar:///';
$locationstart = 'phar:///';
}
$drive = '\\' === DIRECTORY_SEPARATOR ? array_shift($parts).'/' : '';
$location = $locationstart.$drive.implode('/', array_map('rawurlencode', $parts));
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/Translation/Loader/XliffFileLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,15 +234,15 @@ private function fixXmlLocation($schemaSource, $xmlUri)
{
$newPath = str_replace('\\', '/', __DIR__).'/schema/dic/xliff-core/xml.xsd';
$parts = explode('/', $newPath);
$locationstart= 'file:///';
$locationstart = 'file:///';
if (0 === stripos($newPath, 'phar://')) {
$tmpfile = tempnam(sys_get_temp_dir(), 'symfony');
if ($tmpfile) {
copy($newPath, $tmpfile);
$parts = explode('/', str_replace('\\', '/', $tmpfile));
}
array_shift($parts);
$locationstart='phar:///';
$locationstart = 'phar:///';
}

$drive = '\\' === DIRECTORY_SEPARATOR ? array_shift($parts).'/' : '';
Expand Down
0