Skip to content

Commit 3c8cf9a

Browse files
committed
[Translation] Don't pass null to strtoupper()
Signed-off-by: Alexander M. Turek <me@derrabus.de>
1 parent c127120 commit 3c8cf9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Translation/Loader/XliffFileLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ private function extract($resource, MessageCatalogue $catalogue, string $domain)
7676
private function extractXliff1(\DOMDocument $dom, MessageCatalogue $catalogue, string $domain)
7777
{
7878
$xml = simplexml_import_dom($dom);
79-
$encoding = strtoupper($dom->encoding);
79+
$encoding = $dom->encoding ? strtoupper($dom->encoding) : null;
8080

8181
$namespace = 'urn:oasis:names:tc:xliff:document:1.2';
8282
$xml->registerXPathNamespace('xliff', $namespace);

0 commit comments

Comments
 (0)