From 6bf1ac54b1b5b62288fe9475117be0fd11ea3b9d Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Fri, 21 Dec 2012 09:08:23 +0000 Subject: [PATCH] Only raise errors from error_reporting() --- flight/Flight.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flight/Flight.php b/flight/Flight.php index 65f1a45..6657d5e 100644 --- a/flight/Flight.php +++ b/flight/Flight.php @@ -129,7 +129,9 @@ class Flight { * @param int $errline Error file line number */ public static function handleError($errno, $errstr, $errfile, $errline) { - static::handleException(new ErrorException($errstr, $errno, 0, $errfile, $errline)); + if ($errno & error_reporting()) { + static::handleException(new ErrorException($errstr, $errno, 0, $errfile, $errline)); + } } /**