View Issue Details

IDProjectCategoryView StatusLast Update
0036812mantisbtcode cleanuppublic2026-01-07 07:21
Reporterdregad Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status confirmedResolutionopen 
Target Version2.28.1 
Summary0036812: PHP 8.4: Passing E_USER_ERROR to trigger_error() is deprecated
Description

Example:
DEPRECATED: 'Passing E_USER_ERROR to trigger_error() is deprecated since 8.4, throw an exception or call exit with a string message instead' in '/Users/dregad/dev/mantisbt/mantis/core/error_api.php' line 113

Today we actually do this all over the place...

git grep -Pw "trigger_error\(.*,\s*(E_USER_)?ERROR\s*\)"

shows 248 occurrences in the code, plus 3 in the documentation

TagsPHP 8.4

Relationships

child of 0035216 closeddregad PHP 8.4 compatibility 

Activities

dregad

dregad

2026-01-07 07:21

developer   ~0070705

This is not going to be a trivial fix.

  • trigger_error() calls using E_USER_ERROR error level must be replaced by throw exception statements
  • significant refactoring of Error API is required
  • There is an impact on Plugin API (to be analyzed), as Plugin errors are currently identified by a string, not an error number which is expected by Exceptions