[Translation][Xliff loader] fixed check target node.

This commit is contained in:
Abdellatif Ait boudad 2015-08-27 08:47:02 +00:00
parent 4353134903
commit 09e88dc676

View File

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