mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
Adding cakeError calls to ModelBehavior.
This commit is contained in:
parent
c2db059732
commit
7ca1ef22f0
1 changed files with 15 additions and 0 deletions
|
@ -292,6 +292,21 @@ class BehaviorCollection extends Object {
|
||||||
$class = $name . 'Behavior';
|
$class = $name . 'Behavior';
|
||||||
|
|
||||||
if (!App::import('Behavior', $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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue