From 8170b1f89f685d3cd60b35c5bb734de989567572 Mon Sep 17 00:00:00 2001 From: phpnut Date: Thu, 12 Apr 2007 07:38:25 +0000 Subject: [PATCH] Correcting [4849], would attempt to load non existent model is var $uses was not set git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4850 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/error.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cake/libs/error.php b/cake/libs/error.php index c992a30b3..cdbdf467e 100644 --- a/cake/libs/error.php +++ b/cake/libs/error.php @@ -65,8 +65,10 @@ class ErrorHandler extends Object{ } $this->controller =& new AppController(); + if(!empty($this->controller->uses)) { + $this->controller->constructClasses(); + } $this->controller->_initComponents(); - $this->controller->constructClasses(); $this->controller->cacheAction = false; $this->__dispatch->start($this->controller);