Restore $response->_view after render() #38

Merged
merged 1 commit into from Apr 29, 2012
View
@@ -522,6 +522,8 @@ public function yield() {
//Renders a view + optional layout
public function render($view, array $data = array()) {
+ $original_view = $this->_view;
+
if (!empty($data)) {
$this->set($data);
}
@@ -534,6 +536,9 @@ public function render($view, array $data = array()) {
if (false !== $this->chunked) {
$this->chunk();
}
+
+ // restore state for parent render()
+ $this->_view = $original_view;
}
// Renders a view without a layout
@@ -757,4 +762,4 @@ public function __call( $method, $args ) {
return call_user_func_array( $this->$method, $args );
}
}
-}
+}