Merge branch 'support_for_xe_and_index_field' into develop

This commit is contained in:
antoine 2017-06-16 18:01:23 +02:00
commit 373039cbdc
1 changed files with 1 additions and 3 deletions

View File

@ -17,8 +17,6 @@
namespace PhpOffice\PhpWord\Writer\Word2007\Element;
use PhpOffice\PhpWord\Element\TextRun;
/**
* Field element writer
*
@ -66,7 +64,7 @@ class Field extends Text
$xmlWriter->endElement(); // w:r
if ($element->getText() != null) {
if ($element->getText() instanceof TextRun) {
if ($element->getText() instanceof PhpOffice\PhpWord\Element\TextRun) {
$containerWriter = new Container($xmlWriter, $element->getText(), true);
$containerWriter->write();