diff --git a/app/Controller/AppController.php b/app/Controller/AppController.php index 62dc2ce78..ad9f250d6 100755 --- a/app/Controller/AppController.php +++ b/app/Controller/AppController.php @@ -87,6 +87,8 @@ class AppController extends Controller { throw new ForbiddenException('Incorrect authentication key'); } } + } else { + $this->Security->blackHoleCallback = 'blackhole'; } // These variables are required for every view @@ -94,6 +96,10 @@ class AppController extends Controller { $this->set('isAdmin', $this->_isAdmin()); } + public function blackhole($type) { + // handle errors. + } + protected function _isRest() { return (isset($this->RequestHandler) && $this->RequestHandler->isXml()); }