[icinga-checkins] icinga.org: icinga-web/jmosshammer/filtering: Fixed missing error supression check in exception handler

git at icinga.org git at icinga.org
Wed Jan 2 15:43:54 CET 2013


Module: icinga-web
Branch: jmosshammer/filtering
Commit: 1987b97864c30c0ec353352171e707f096322561
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=1987b97864c30c0ec353352171e707f096322561

Author: Jannis Mosshammer <jannis.mosshammer at netways.de>
Date:   Tue Dec 18 09:41:07 2012 +0100

Fixed missing error supression check in exception handler

---

 .../lib/logging/AppKitExceptionHandler.class.php   |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/app/modules/AppKit/lib/logging/AppKitExceptionHandler.class.php b/app/modules/AppKit/lib/logging/AppKitExceptionHandler.class.php
index 55b835f..25409c8 100644
--- a/app/modules/AppKit/lib/logging/AppKitExceptionHandler.class.php
+++ b/app/modules/AppKit/lib/logging/AppKitExceptionHandler.class.php
@@ -44,6 +44,10 @@ class AppKitExceptionHandler {
     public static function exceptionOnError(
         $errno, $errstr, $errfile, $errline, array $errcontext = array()
     ) {
+        // do nothing if the error is supressed
+        if(error_reporting() == 0) {
+            return false;
+        }
         $message = sprintf('PHP Error %s (%s:%d)', $errstr, $errfile, $errline);
         self::logException(new AppKitPHPError($message, $errno));
     }





More information about the icinga-checkins mailing list