Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bab9ac5

Browse files
minor #15629 [Translation][Xliff loader] fixed check target node. (aitboudad)
This PR was merged into the 2.8 branch. Discussion ---------- [Translation][Xliff loader] fixed check target node. | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | related to #15604 | License | MIT | Doc PR | ~ Commits ------- 09e88dc [Translation][Xliff loader] fixed check target node.
2 parents 4353134 + 09e88dc commit bab9ac5

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
@@ -63,7 +63,7 @@ public function load($resource, $locale, $domain = 'messages')
6363
if ($notes = $this->parseNotesMetadata($translation->note, $encoding)) {
6464
$metadata['notes'] = $notes;
6565
}
66-
if ($translation->target->attributes()) {
66+
if (isset($translation->target) && $translation->target->attributes()) {
6767
$metadata['target-attributes'] = $translation->target->attributes();
6868
}
6969

0 commit comments

Comments
 (0)