From f2c43291088f2080edfc2ef48b6d94d686d23f10 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Fri, 4 Jul 2014 16:00:17 +0400 Subject: [PATCH] [FIXED] Wrong use of passing by reference. --- src/PhpWord/Reader/Word2007/AbstractPart.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/PhpWord/Reader/Word2007/AbstractPart.php b/src/PhpWord/Reader/Word2007/AbstractPart.php index efca1962..90538aec 100644 --- a/src/PhpWord/Reader/Word2007/AbstractPart.php +++ b/src/PhpWord/Reader/Word2007/AbstractPart.php @@ -94,13 +94,13 @@ abstract class AbstractPart * * @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader * @param \DOMElement $domNode - * @param mixed &$parent + * @param mixed $parent * @param string $docPart * @return void * * @todo Get font style for preserve text */ - protected function readParagraph(XMLReader $xmlReader, \DOMElement $domNode, &$parent, $docPart = 'document') + protected function readParagraph(XMLReader $xmlReader, \DOMElement $domNode, $parent, $docPart = 'document') { // Paragraph style $paragraphStyle = null; @@ -168,7 +168,7 @@ abstract class AbstractPart } else { $textParent = $parent; if ($runLinkCount > 1) { - $textParent = &$parent->addTextRun($paragraphStyle); + $textParent = $parent->addTextRun($paragraphStyle); } $nodes = $xmlReader->getElements('*', $domNode); foreach ($nodes as $node) { @@ -183,14 +183,14 @@ abstract class AbstractPart * * @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader * @param \DOMElement $domNode - * @param mixed &$parent + * @param mixed $parent * @param string $docPart * @param mixed $paragraphStyle * @return void * * @todo Footnote paragraph style */ - protected function readRun(XMLReader $xmlReader, \DOMElement $domNode, &$parent, $docPart, $paragraphStyle = null) + protected function readRun(XMLReader $xmlReader, \DOMElement $domNode, $parent, $docPart, $paragraphStyle = null) { if (!in_array($domNode->nodeName, array('w:r', 'w:hyperlink'))) { return;