Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

AclNode now throws exception instead of trigger_error

  • Loading branch information...
commit ee54daef352bec0660e295790a4a9066f257ab3c 1 parent 9e8152f
@ceeram ceeram authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/Cake/Model/AclNode.php
View
5 lib/Cake/Model/AclNode.php
@@ -128,8 +128,7 @@ public function node($ref = null) {
$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 @@ public function node($ref = null) {
$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;
Please sign in to comment.
Something went wrong with that request. Please try again.