Skip to content

Commit

Permalink
Force reporting of E_USER_* in error api
Browse files Browse the repository at this point in the history
Solves the problem of Mantis silently proceeding through errors that
should effectively stop code execution, when error_reporting is disabled
in php.ini or apache mod config.

This follows @davidhicks recommendation in comment ~22998.

Fixes #10966

Backported from master cec4549.
  • Loading branch information
dregad committed Nov 15, 2014
1 parent ee8100d commit ef3e1d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/error_api.php
Expand Up @@ -27,6 +27,10 @@
$g_error_proceed_url = null;
$g_error_send_page_header = true;

# Make sure we always capture User-defined errors regardless of ini settings
# These can be disabled in config_inc.php, see $g_display_errors
error_reporting( error_reporting() | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE );

set_error_handler( 'error_handler' );

/**
Expand Down

0 comments on commit ef3e1d4

Please sign in to comment.