Confirmed by grep: ErrorHandler::init() has exactly one caller app-wide (api/get_template.php). index.php never calls it. ErrorHandler's shutdown handler is well-designed — catches E_ERROR/E_PARSE/E_CORE_ERROR/E_COMPILE_ERROR via error_get_last() and returns a clean JSON 500 — but since it's never registered for page views (or 32 of 33 API endpoints, a related gap already filed separately), a genuine PHP fatal during a page render (out-of-memory, an unrecoverable TypeError, etc.) falls through to PHP's raw default handling: whatever display_errors's server-wide ini default is determines whether the visitor sees a raw stack trace or a silently truncated blank page. There is no app-level 500 response in either case — no styled error page, no JSON fallback.
Fix: Register ErrorHandler::init() (or a page-view-appropriate variant that renders a styled HTML error page rather than JSON) at the top of index.php, and wire it into the remaining API endpoints per the already-filed related issue.
**Severity:** Medium
Confirmed by grep: `ErrorHandler::init()` has exactly one caller app-wide (`api/get_template.php`). `index.php` never calls it. `ErrorHandler`'s shutdown handler is well-designed — catches `E_ERROR`/`E_PARSE`/`E_CORE_ERROR`/`E_COMPILE_ERROR` via `error_get_last()` and returns a clean JSON 500 — but since it's never registered for page views (or 32 of 33 API endpoints, a related gap already filed separately), a genuine PHP fatal during a page render (out-of-memory, an unrecoverable `TypeError`, etc.) falls through to PHP's raw default handling: whatever `display_errors`'s server-wide ini default is determines whether the visitor sees a raw stack trace or a silently truncated blank page. There is no app-level 500 response in either case — no styled error page, no JSON fallback.
**Fix:** Register `ErrorHandler::init()` (or a page-view-appropriate variant that renders a styled HTML error page rather than JSON) at the top of `index.php`, and wire it into the remaining API endpoints per the already-filed related issue.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Severity: Medium
Confirmed by grep:
ErrorHandler::init()has exactly one caller app-wide (api/get_template.php).index.phpnever calls it.ErrorHandler's shutdown handler is well-designed — catchesE_ERROR/E_PARSE/E_CORE_ERROR/E_COMPILE_ERRORviaerror_get_last()and returns a clean JSON 500 — but since it's never registered for page views (or 32 of 33 API endpoints, a related gap already filed separately), a genuine PHP fatal during a page render (out-of-memory, an unrecoverableTypeError, etc.) falls through to PHP's raw default handling: whateverdisplay_errors's server-wide ini default is determines whether the visitor sees a raw stack trace or a silently truncated blank page. There is no app-level 500 response in either case — no styled error page, no JSON fallback.Fix: Register
ErrorHandler::init()(or a page-view-appropriate variant that renders a styled HTML error page rather than JSON) at the top ofindex.php, and wire it into the remaining API endpoints per the already-filed related issue.