diff --git a/Translation/Loader/Symfony/XliffLoader.php b/Translation/Loader/Symfony/XliffLoader.php index 8d4836fb..7cd12205 100644 --- a/Translation/Loader/Symfony/XliffLoader.php +++ b/Translation/Loader/Symfony/XliffLoader.php @@ -42,7 +42,7 @@ class XliffLoader implements LoaderInterface public function load($resource, $locale, $domain = 'messages') { $previous = libxml_use_internal_errors(true); - if (false === $xml = simplexml_load_file($resource)) { + if (false === $xml = simplexml_load_file((string) $resource)) { libxml_use_internal_errors($previous); $error = libxml_get_last_error(); @@ -61,7 +61,7 @@ public function load($resource, $locale, $domain = 'messages') $catalogue->set($id, (string) $translation->target, $domain); } - $catalogue->addResource(new FileResource($resource)); + $catalogue->addResource(new FileResource((string) $resource)); return $catalogue; } diff --git a/Translation/Loader/XliffLoader.php b/Translation/Loader/XliffLoader.php index b6148bc9..73664d36 100644 --- a/Translation/Loader/XliffLoader.php +++ b/Translation/Loader/XliffLoader.php @@ -37,7 +37,7 @@ class XliffLoader implements LoaderInterface public function load($resource, $locale, $domain = 'messages') { $previous = libxml_use_internal_errors(true); - if (false === $doc = simplexml_load_file($resource)) { + if (false === $doc = simplexml_load_file((string) $resource)) { libxml_use_internal_errors($previous); $libxmlError = libxml_get_last_error();