You are here

function _debug_error_handler in Advertisement 6.3

Same name and namespace in other branches
  1. 5.2 adserve.inc \_debug_error_handler()
  2. 6.2 adserve.inc \_debug_error_handler()
  3. 7 adserve.inc \_debug_error_handler()
1 string reference to '_debug_error_handler'
_debug_echo in ./adserve.inc
Dump debug message to screen; set custom error handler.

File

./adserve.inc, line 217
Configuration.

Code

function _debug_error_handler($errno, $errstr, $errfile = NULL, $errline = 0, $errcontext = NULL) {
  if (!preg_match('/Cannot modify header information/', $errstr) && !preg_match('/Cannot send session cache limiter/', $errstr)) {
    echo "PHP: errno({$errno}): {$errstr} ";
    if ($errfile && $errline) {
      echo "; Line {$errline} in [{$errfile}]";
    }
    echo "<br />\n";
    if (!empty($errcontext) && adserve_variable('debug') >= 5) {
      echo 'Error context:<pre>';
      print_r($errcontext);
      echo '</pre>';
    }
  }
}