Changeset:
        b1834d82b9e1
        
https://sourceforge.net/p/mrbs/hg-code/ci/b1834d82b9e11e564ff5356896df3b342928cee9
Author:
        Campbell Morrison <[email protected]>
Date:
        Thu Dec 29 16:31:16 2016 +0000
Log message:

Fixed the custom error handler so that it doesn't report errors if the error 
suppression operator has been used.

diffstat:

 web/functions_error.inc |  8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diffs (18 lines):

diff -r 5abfcd33114b -r b1834d82b9e1 web/functions_error.inc
--- a/web/functions_error.inc   Tue Dec 13 10:39:37 2016 +0000
+++ b/web/functions_error.inc   Thu Dec 29 16:31:16 2016 +0000
@@ -71,6 +71,14 @@
 
 function error_handler($errno, $errstr, $errfile, $errline, $errcontext)
 {
+  // Check to see whether error reporting has been disabled by
+  // the error suppression operator (@), because the custom error
+  // handler is still called even if errors are suppressed.
+  if (error_reporting(0) === 0)
+  {
+    return;
+  }
+  
   $heading = "\n" . get_error_name($errno) . " in $errfile at line $errline\n";
   
   // Show the superglobal data unless the error is minor

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to