mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
AclNode now throws exception instead of trigger_error
This commit is contained in:
parent
9e8152f949
commit
ee54daef35
1 changed files with 2 additions and 3 deletions
|
@ -128,8 +128,7 @@ class AclNode extends Model {
|
|||
$model = ClassRegistry::init(array('class' => $name, 'alias' => $alias));
|
||||
|
||||
if (empty($model)) {
|
||||
trigger_error(__d('cake_dev', "Model class '%s' not found in AclNode::node() when trying to bind %s object", $type, $this->alias), E_USER_WARNING);
|
||||
return null;
|
||||
throw new CakeException('cake_dev', "Model class '%s' not found in AclNode::node() when trying to bind %s object", $type, $this->alias);
|
||||
}
|
||||
|
||||
$tmpRef = null;
|
||||
|
@ -173,7 +172,7 @@ class AclNode extends Model {
|
|||
$result = $db->read($this, $queryData, -1);
|
||||
|
||||
if (!$result) {
|
||||
trigger_error(__d('cake_dev', "AclNode::node() - Couldn't find %s node identified by \"%s\"", $type, print_r($ref, true)), E_USER_WARNING);
|
||||
throw new CakeException(__d('cake_dev', "AclNode::node() - Couldn't find %s node identified by \"%s\"", $type, print_r($ref, true)));
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
|
|
Loading…
Add table
Reference in a new issue