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.
This commit is contained in:
Nicolas Grekas 2015-08-27 11:20:46 +02:00
commit bab9ac542c
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ class XliffFileLoader implements LoaderInterface
if ($notes = $this->parseNotesMetadata($translation->note, $encoding)) {
$metadata['notes'] = $notes;
}
if ($translation->target->attributes()) {
if (isset($translation->target) && $translation->target->attributes()) {
$metadata['target-attributes'] = $translation->target->attributes();
}