Adding cakeError calls to ModelBehavior.

This commit is contained in:
mark_story 2009-08-27 00:16:17 -04:00
parent c2db059732
commit 7ca1ef22f0

View file

@ -292,6 +292,21 @@ class BehaviorCollection extends Object {
$class = $name . 'Behavior';
if (!App::import('Behavior', $behavior)) {
$this->cakeError('missingBehaviorFile', array(array(
'behavior' => $behavior,
'file' => Inflector::underscore($behavior) . '.php',
'code' => 500,
'base' => '/'
)));
return false;
}
if (!class_exists($behavior . 'Behavior')) {
$this->cakeError('missingBehaviorClass', array(array(
'behavior' => $behavior,
'file' => Inflector::underscore($behavior) . '.php',
'code' => 500,
'base' => '/'
)));
return false;
}