MantisBT: master ce841a23

Author Committer Branch Timestamp Parent
dregad dregad master 2023-10-08 10:00 master cc891e57
Affected Issues  0033010: PHP errors triggered by Admin Checks cause silent failure
Changeset

Fix Admin Checks silently failing after Exception

If an Admin check throws an exception, it is caught by the default
exception handler and MantisBT triggers an ERROR_PHP.

This in turn is caught by check_error_handler(), which just stores it in
$g_error_raised, but since code execution can't continue it is never
reported to the end-user, which causes confusion and makes debugging
of the admin checks difficult.

To avoid this, check_error_handler() now detects if it's processing an
E_USER_ERROR of type ERROR_PHP and lets PHP handle it.

Fixes 0033010

mod - admin/check/check_api.php Diff File