Skip to content

Commit

Permalink
Fix: Returning the right name for the active block
Browse files Browse the repository at this point in the history
  • Loading branch information
lazybobcat committed Jul 26, 2015
1 parent 8b75b9d commit 1db3b0f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/View/ViewBlock.php
Expand Up @@ -111,12 +111,12 @@ public function end()
$mode = end($this->_active);
$active = key($this->_active);
$content = ob_get_clean();
array_pop($this->_active);
if($mode === ViewBlock::OVERRIDE) {
$this->_blocks[$active] = $content;
} else {
$this->concat($active, $content, $mode);
}
array_pop($this->_active);
}
}

Expand Down Expand Up @@ -207,7 +207,8 @@ public function keys()
*/
public function active()
{
return end($this->_active);
end($this->_active);
return key($this->_active);
}

/**
Expand Down

0 comments on commit 1db3b0f

Please sign in to comment.