Permalink
Browse files

temporary change

  • Loading branch information...
1 parent 65f3a05 commit 86c486a3347321843ac41b4b669a31ff2d11ef2a @shaunlee committed Sep 22, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 ajoy/components/EasyView.php
View
8 ajoy/components/EasyView.php
@@ -105,10 +105,10 @@ public function render($template, array $context = array(), $return = false)
if (!file_exists($filename))
app()->raise('Views file with name "' . $this->viewsPath . '/' . $template . '.php" does not exists.');
- $layouts = &$this->layouts;
- $ctx = call_user_func_array(array($this, 'renderFile'), array($filename, function($ctx) use ($layouts) {
- if (!empty($layouts)) {
- $layout = array_pop($layouts);
+ $view = $this;
+ $ctx = call_user_func_array(array($this, 'renderFile'), array($filename, function($ctx) use ($view) {
+ if (!empty($view->layouts)) {
+ $layout = array_pop($view->layouts);
$ctx = $this->render($layout, array(), true);
}
return $ctx;

0 comments on commit 86c486a

Please sign in to comment.