Permalink
Browse files

Fix for unset `_request` property when calling `_render()`

  • Loading branch information...
1 parent c3419a4 commit 6387beb0cfaa731d973bd49aa975d493f043b919 @mikegreiling mikegreiling committed Sep 3, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 template/view/Renderer.php
@@ -486,8 +486,10 @@ public function set(array $data = array()) {
* @return string Returns a the rendered template content as a string.
*/
protected function _render($type, $template, array $data = array(), array $options = array()) {
- $library = $this->_request->library;
- $options += compact('library');
+ if ($this->_request) {
+ $library = $this->_request->library;
+ $options += compact('library');
+ }
return $this->_view->render($type, $data + $this->_data, compact('template') + $options);
}
}

0 comments on commit 6387beb

Please sign in to comment.