MantisBT: master b92b04d7

Author Committer Branch Timestamp Parent
dregad dregad master 2026-09-05 09:42 master a0a21b22
Affected Issues  0037368: Calling access_denied() function from CLI triggers PHP warning
Changeset

Fix PHP warning in access_denied() from CLI

When running from CLI, PHP throws SYSTEM WARNING: http_response_code():
Cannot set response code - headers already sent.

It makes no sense to output HTML, send a response code and redirect in
a CLI context anyway, so this commit adds a bypass that just aborts the
script with exit code 1.

Fixes 0037368

mod - core/access_api.php Diff File