Not sure if this is the most correct way to handle this, but I wanted to use a custom error method in my controllers. However, if you’ve been working with CakePHP a bit, you’ll notice that Cake automatically throws a 404 error when you set debug to 0.
To get around this I opened up /cake/libs/error.php and commented out the following lines:
/*if (Configure::read() == 0) {
$method = 'error404';
if (isset($code) && $code == 500) {
$method = 'error500';
}
}*/
This seems to solve the problem, for now. Hopefully this will be fixed in a future version of Cake because I detest modifying core files.