From 47a17a33e848acef81075de182330c7b0c674797 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Fri, 4 Jul 2014 13:02:28 +0400 Subject: [PATCH] Revert: [FIXED] Wrong use of passing by reference. --- src/PhpWord/Element/Section.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PhpWord/Element/Section.php b/src/PhpWord/Element/Section.php index 6377ad49..d746f69b 100644 --- a/src/PhpWord/Element/Section.php +++ b/src/PhpWord/Element/Section.php @@ -164,7 +164,7 @@ class Section extends AbstractContainer $containerClass = substr(get_class($this), 0, strrpos(get_class($this), '\\')) . '\\' . ($header ? 'Header' : 'Footer'); $collectionArray = $header ? 'headers' : 'footers'; - $collection = &$collectionArray; + $collection = &$this->$collectionArray; if (in_array($type, array(Header::AUTO, Header::FIRST, Header::EVEN))) { $index = count($collection);