From 3a828d2338fb7df2e396933abeb8074515829142 Mon Sep 17 00:00:00 2001 From: nate Date: Wed, 11 Apr 2007 18:01:24 +0000 Subject: [PATCH] Throwing Missing Model error for missing associated classes, per gwoo git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4837 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/model/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cake/libs/model/model.php b/cake/libs/model/model.php index 15de28562..11d673a66 100644 --- a/cake/libs/model/model.php +++ b/cake/libs/model/model.php @@ -650,7 +650,7 @@ class Model extends Overloadable { if(!class_exists($className)) { if (!loadModel($className)) { - trigger_error("Model::__constructedLinkedModel() - Failed loading model class {$className} when attempting to construct {$this->name}. Make sure that " . Inflector::underscore($className) . ".php exists in your model path, and that the class name is correct.", E_USER_WARNING); + return $this->cakeError('missingModel', array(array('className' => $className))); } }