Permalink
Browse files

temporary change

  • Loading branch information...
1 parent d2be5be commit 65f3a05b9fb3adaa0bda112544d1d0b52ad6bac1 @shaunlee committed Sep 22, 2013
Showing with 4 additions and 3 deletions.
  1. +4 −3 ajoy/components/EasyView.php
@@ -105,9 +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.');
- $ctx = call_user_func_array(array($this, 'renderFile'), array($filename, function($ctx) {
- if (!empty($this->layouts)) {
- $layout = array_pop($this->layouts);
+ $layouts = &$this->layouts;
+ $ctx = call_user_func_array(array($this, 'renderFile'), array($filename, function($ctx) use ($layouts) {
+ if (!empty($layouts)) {
+ $layout = array_pop($layouts);
$ctx = $this->render($layout, array(), true);
}
return $ctx;

0 comments on commit 65f3a05

Please sign in to comment.