[FIXED] Wrong use of passing by reference.
This commit is contained in:
parent
1b9b8d4f90
commit
f2c4329108
|
|
@ -94,13 +94,13 @@ abstract class AbstractPart
|
||||||
*
|
*
|
||||||
* @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader
|
* @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader
|
||||||
* @param \DOMElement $domNode
|
* @param \DOMElement $domNode
|
||||||
* @param mixed &$parent
|
* @param mixed $parent
|
||||||
* @param string $docPart
|
* @param string $docPart
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @todo Get font style for preserve text
|
* @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
|
// Paragraph style
|
||||||
$paragraphStyle = null;
|
$paragraphStyle = null;
|
||||||
|
|
@ -168,7 +168,7 @@ abstract class AbstractPart
|
||||||
} else {
|
} else {
|
||||||
$textParent = $parent;
|
$textParent = $parent;
|
||||||
if ($runLinkCount > 1) {
|
if ($runLinkCount > 1) {
|
||||||
$textParent = &$parent->addTextRun($paragraphStyle);
|
$textParent = $parent->addTextRun($paragraphStyle);
|
||||||
}
|
}
|
||||||
$nodes = $xmlReader->getElements('*', $domNode);
|
$nodes = $xmlReader->getElements('*', $domNode);
|
||||||
foreach ($nodes as $node) {
|
foreach ($nodes as $node) {
|
||||||
|
|
@ -183,14 +183,14 @@ abstract class AbstractPart
|
||||||
*
|
*
|
||||||
* @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader
|
* @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader
|
||||||
* @param \DOMElement $domNode
|
* @param \DOMElement $domNode
|
||||||
* @param mixed &$parent
|
* @param mixed $parent
|
||||||
* @param string $docPart
|
* @param string $docPart
|
||||||
* @param mixed $paragraphStyle
|
* @param mixed $paragraphStyle
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @todo Footnote paragraph style
|
* @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'))) {
|
if (!in_array($domNode->nodeName, array('w:r', 'w:hyperlink'))) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue