Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b87de42

Browse filesBrowse files
minor #41562 [Translation] Don't pass null to strtoupper() (derrabus)
This PR was merged into the 4.4 branch. Discussion ---------- [Translation] Don't pass null to strtoupper() | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Part of #41552 | License | MIT | Doc PR | N/A This error popped up on 5.3, but not on 4.4. That's why I missed it when fixing the other occurrence with #41240. Commits ------- 3c8cf9a [Translation] Don't pass null to strtoupper()
2 parents 5854a82 + 3c8cf9a commit b87de42
Copy full SHA for b87de42

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Loader/XliffFileLoader.php
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.