Module: nagvis
Branch: master
Commit: 309989e20b468b733ada538745c0686fdadd3aaa
URL:    
http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=309989e20b468b733ada538745c0686fdadd3aaa

Author: Lars Michelsen <[email protected]>
Date:   Thu Jun 17 18:31:39 2010 +0200

#314 The ajax error now uses the error_reporting options of PHP

---

 share/server/core/functions/ajaxErrorHandler.php |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/share/server/core/functions/ajaxErrorHandler.php 
b/share/server/core/functions/ajaxErrorHandler.php
index 87c9371..00f6eca 100644
--- a/share/server/core/functions/ajaxErrorHandler.php
+++ b/share/server/core/functions/ajaxErrorHandler.php
@@ -30,11 +30,12 @@
  * @author     Lars Michelsen <[email protected]>
  */
 function ajaxError($errno, $errstr = '', $file = '', $line = '') {
-       // Don't handle E_STRICT errors
-       if($errno != 2048) {
-               echo "Error: (".$errno.") ".$errstr. " (".$file.":".$line.")";
-               die();
-       }
+       // Use current error_reporting settings to skip unwanted errors
+       if(!(error_reporting() & $errno))
+               return false;
+       
+       echo "Error: (".$errno.") ".$errstr. " (".$file.":".$line.")";
+       die();
 }
 
 function ajaxException($OBJ) {


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to