FMCorz / AclManager

Plugin to manage Acl for CakePHP 2.x
59 stars 33 forks source link

Exception not catched in Cake 2.1 #4

Closed afolgado closed 12 years ago

afolgado commented 12 years ago

As CakePHP 2.1 uses exceptions for error handling in many functions instead of returning FALSE, the update_aros function is failing.

AclController.php, line 279:

$node = $Model->node();

If the node lookup fails it will throw a CakeException that must be caught. So the fix is:

            try {
                $node = $Model->node();
            } catch (CakeException $e) {
                $node = false;
            }
FMCorz commented 12 years ago

Fixed in last stable. Cheers!