From 7ad1126cf18cd5b732e54fd7c853931a540d2400 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 8 Aug 2011 15:19:44 -0500 Subject: [PATCH] Add sub-view evaluating back to view class. --- system/view.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/system/view.php b/system/view.php index 72c0cc3d..44d9f686 100644 --- a/system/view.php +++ b/system/view.php @@ -170,6 +170,11 @@ public function get() throw new \Exception("View [$view] does not exist."); } + foreach ($this->data as &$data) + { + if ($data instanceof View or $data instanceof Response) $data = (string) $data; + } + ob_start() and extract($this->data, EXTR_SKIP); try { include $this->path.$view.EXT; } catch (\Exception $e) { Error::handle($e); }