From ec53963d400cae5db35af3c61276442924dddf16 Mon Sep 17 00:00:00 2001 From: brego Date: Mon, 4 Jul 2005 01:23:27 +0000 Subject: [PATCH] Some PHP5 notices. git-svn-id: https://svn.cakephp.org/repo/trunk/cake@310 3807eeeb-6ff5-0310-8944-8be069107fe0 --- libs/controller.php | 1 + libs/view.php | 25 ++++++++++++++----------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/libs/controller.php b/libs/controller.php index da5bc11a6..7f5ea2a0a 100644 --- a/libs/controller.php +++ b/libs/controller.php @@ -294,6 +294,7 @@ class Controller extends Object $view->parent =& $this->parent; $view->viewPath =& $this->viewPath; $view->params =& $this->params; + $view->data =& $this->data; foreach ($this->models as $key => $value) { diff --git a/libs/view.php b/libs/view.php index ade3bc2a9..604ccc6b2 100644 --- a/libs/view.php +++ b/libs/view.php @@ -155,7 +155,7 @@ class View extends Object var $hasRendered = null; var $modelsLoaded = false; - + function View(){ } @@ -210,9 +210,9 @@ class View extends Object // What is reason for these being the same? if (isset($this->hasRendered) && $this->hasRendered) { - //echo "
";
-		//print_r($this);
-		//echo "
"; + //echo "
";
+			//print_r($this);
+			//echo "
"; return true; } else @@ -474,13 +474,16 @@ class View extends Object require_once $helperFn; if(class_exists($helperCn)===true); { - ${$helper} = new $helperCn; - ${$helper}->base = $this->base; - ${$helper}->here = $this->here; - ${$helper}->params = $this->params; - ${$helper}->action = $this->action; - //${$helper}->data = $this->data; - //${$helper}->validationErrors = $this->validationErrors; + ${$helper} = new $helperCn; + ${$helper}->base = $this->base; + ${$helper}->here = $this->here; + ${$helper}->params = $this->params; + ${$helper}->action = $this->action; + ${$helper}->data = $this->data; + if(!empty($this->validationErrors)) + { + ${$helper}->validationErrors = $this->validationErrors; + } } } }