Skip to content

Commit 8dc8025

Browse files
authored
Fix issue while loading a container
When the URI of the container contains escaped characters like `%2F`, `simplexml_load_file` throw an error.
1 parent 6b4d9f1 commit 8dc8025

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/XmlServiceMapFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function __construct(string $containerXml)
2020

2121
public function create(): ServiceMap
2222
{
23-
$xml = @simplexml_load_file($this->containerXml);
23+
$xml = @simplexml_load_file(rawurlencode($this->containerXml));
2424
if ($xml === false) {
2525
throw new XmlContainerNotExistsException(sprintf('Container %s does not exist or cannot be parsed', $this->containerXml));
2626
}

0 commit comments

Comments
 (0)