From 048c917ea59f815dd8eef965ebdaf63897356511 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sat, 15 Oct 2011 22:57:49 -0500 Subject: [PATCH] tweaking the error bootstrap file. --- laravel/bootstrap/errors.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/laravel/bootstrap/errors.php b/laravel/bootstrap/errors.php index 452cb1d6..c159071d 100644 --- a/laravel/bootstrap/errors.php +++ b/laravel/bootstrap/errors.php @@ -33,9 +33,8 @@ }; /** - * Create the exception handler function. All of the handlers - * registered with PHP will call this handler when an error - * occurs so the code stays D.R.Y. + * Create the exception handler function. All of the error handlers + * registered with PHP call this closure to keep the code D.R.Y. */ $handler = function($e) use ($formatter) { @@ -72,7 +71,9 @@ { if ( ! is_null($error = error_get_last())) { - $handler(new \ErrorException($error['message'], $error['type'], 0, $error['file'], $error['line'])); + extract($error, EXTR_SKIP); + + $handler(new \ErrorException($message, $type, 0, $file, $line)); } });