[Translation] Don't pass null to strtoupper()

Signed-off-by: Alexander M. Turek <me@derrabus.de>
This commit is contained in:
Alexander M. Turek 2021-06-06 10:50:48 +02:00
parent c127120b9e
commit 3c8cf9a3d4
No known key found for this signature in database
GPG Key ID: 819672F969F5F27C
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ class XliffFileLoader implements LoaderInterface
private function extractXliff1(\DOMDocument $dom, MessageCatalogue $catalogue, string $domain)
{
$xml = simplexml_import_dom($dom);
$encoding = strtoupper($dom->encoding);
$encoding = $dom->encoding ? strtoupper($dom->encoding) : null;
$namespace = 'urn:oasis:names:tc:xliff:document:1.2';
$xml->registerXPathNamespace('xliff', $namespace);