Skip to content

Skip logging when DB functions are not yet loaded (logging requires db lookup).

M. Dent requested to merge dentm42/core:DM42-20230717-fixfatalerron304 into dev

When serving static files - the DB functions are not yet loaded, but http_status runs logger() which tries to look up config info from the database. This results in a fatal error. 304 (Not Modified) response codes are not actually sent for unmodified static files which results in undesired behavior and UI wonkiness with CSS and JS that don't get loaded in certain (unpredictable) circumstances.

PR adds a parameter to http_status() and http_status_exit() which leaves the default behavior unchanged, but allows for a signal to be passed to skip logging.

Merge request reports