diff --git a/src/Illuminate/View/Factory.php b/src/Illuminate/View/Factory.php index 3da770b213b1..5527408a21b7 100755 --- a/src/Illuminate/View/Factory.php +++ b/src/Illuminate/View/Factory.php @@ -654,7 +654,7 @@ protected function extendSection($section, $content) foreach ($this->parentMarksLast[$section] as $markLast) { $marks[] = $mark + $markLast + $offset; } - + $offset += $len; } @@ -690,7 +690,7 @@ public function flushSections() $this->parentMarks = []; - $this->parentMarksLast = []; + $this->parentMarksLast = []; } /** diff --git a/tests/View/ViewFactoryTest.php b/tests/View/ViewFactoryTest.php index cf83c901d5d0..b4851b13ee74 100755 --- a/tests/View/ViewFactoryTest.php +++ b/tests/View/ViewFactoryTest.php @@ -250,7 +250,7 @@ public function testSectionExtending() public function testSectionMultipleExtending() { $factory = $this->getFactory(); - + $factory->startSection('foo'); echo 'hello '; $factory->appendParent(); @@ -258,7 +258,7 @@ public function testSectionMultipleExtending() $factory->appendParent(); echo ' again'; $factory->stopSection(); - + $factory->startSection('foo'); echo 'my '; $factory->appendParent(); @@ -266,7 +266,7 @@ public function testSectionMultipleExtending() $factory->appendParent(); echo ' ever'; $factory->stopSection(); - + $factory->startSection('foo'); echo 'best '; $factory->appendParent(); @@ -279,7 +279,7 @@ public function testSectionMultipleExtending() $factory->startSection('foo'); echo 'this is not appended'; $factory->stopSection(); - + $this->assertEquals('hello my best friend best friend ever nice to see you my best friend best friend ever again', $factory->yieldContent('foo')); } @@ -331,12 +331,12 @@ public function testSectionAppending() public function testSectionAppendingCorrectlyHandlesParents() { $factory = $this->getFactory(); - + $factory->startSection('foo'); echo 'hello '; $factory->appendParent(); $factory->appendSection(); - + $factory->startSection('foo'); echo ' nice to see you '; $factory->appendParent();