Skip to content

Commit

Permalink
Allow ParseError as exception and remove typehint.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Scherer committed Nov 9, 2015
1 parent ddfb7d6 commit 7982b6b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/Cake/Error/ErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ class ErrorHandler {
* This will either use custom exception renderer class if configured,
* or use the default ExceptionRenderer.
*
* @param Exception $exception The exception to render.
* @param Exception|ParseError $exception The exception to render.
* @return void
* @see http://php.net/manual/en/function.set-exception-handler.php
*/
public static function handleException(Exception $exception) {
public static function handleException($exception) {
$config = Configure::read('Exception');
static::_log($exception, $config);

Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Error/ExceptionRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ class ExceptionRenderer {
* If the error is a CakeException it will be converted to either a 400 or a 500
* code error depending on the code used to construct the error.
*
* @param Exception $exception Exception
* @param Exception|ParseError $exception Exception
*/
public function __construct(Exception $exception) {
public function __construct($exception) {
$this->controller = $this->_getController($exception);

if (method_exists($this->controller, 'appError')) {
Expand Down

0 comments on commit 7982b6b

Please sign in to comment.