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 @@ class View { 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); }