Skip to content

Commit

Permalink
remove constructor return value.
Browse files Browse the repository at this point in the history
Not sure why this was here, but constructors shouldn't return a value. Nothing in the docs says that a controller's implementation of appError should return a value either. So I figure this was a mistake.
  • Loading branch information
Mathew Foscarini committed Apr 30, 2014
1 parent 6f9efbf commit 2244e02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Cake/Error/ExceptionRenderer.php
Expand Up @@ -92,7 +92,8 @@ public function __construct(Exception $exception) {
$this->controller = $this->_getController($exception);

if (method_exists($this->controller, 'appError')) {
return $this->controller->appError($exception);
$this->controller->appError($exception);
return;
}
$method = $template = Inflector::variable(str_replace('Exception', '', get_class($exception)));
$code = $exception->getCode();
Expand Down

0 comments on commit 2244e02

Please sign in to comment.