[FIXED] Wrong use of passing by reference.

This commit is contained in:
Roman Syroeshko 2014-07-04 13:00:52 +04:00
parent 2c5d13c88e
commit f2e9e3716b
1 changed files with 7 additions and 7 deletions

View File

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