[FIXED] Wrong use of passing by reference.

This commit is contained in:
Roman Syroeshko 2014-07-04 14:44:22 +04:00
parent 47a17a33e8
commit 1b9b8d4f90
1 changed files with 5 additions and 7 deletions

View File

@ -166,15 +166,13 @@ abstract class AbstractPart
if ($runLinkCount == 0) {
$parent->addTextBreak(null, $paragraphStyle);
} else {
$textParent = $parent;
if ($runLinkCount > 1) {
$textParent = &$parent->addTextRun($paragraphStyle);
}
$nodes = $xmlReader->getElements('*', $domNode);
foreach ($nodes as $node) {
$this->readRun(
$xmlReader,
$node,
($runLinkCount > 1) ? $parent->addTextRun($paragraphStyle) : $parent,
$docPart,
$paragraphStyle
);
$this->readRun($xmlReader, $node, $textParent, $docPart, $paragraphStyle);
}
}
}