View Issue Details

IDProjectCategoryView StatusLast Update
0023705mantisbtcode cleanuppublic2017-12-08 21:58
ReportervboctorAssigned Tovboctor 
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionno change required 
Product Version2.9.0 
Target VersionFixed in Version 
Summary0023705: trigger_error() should use E_USER_ERROR instead of E_ERROR
Description

Based on PHP documentation the trigger_error() calls should use E_USER_ERROR, E_USER_WARNING, E_USER_DEPRECATED, etc. We often use the error types that are reserved for the PHP runtime like E_ERROR, E_WARNING, E_DEPRECATED.

TagsNo tags attached.

Activities

dregad

dregad

2017-12-07 04:34

developer   ~0058335

Last edited: 2017-12-07 04:35

View 2 revisions

We often use the error types that are reserved for the PHP runtime like E_ERROR, E_WARNING, E_DEPRECATED.

I don't think we do... Where did you see that ?
Typically, trigger_error() is called with MantisBT-specific constant ERROR, which maps to E_USER_ERROR, not E_ERROR [1]

[1] https://github.com/mantisbt/mantisbt/blob/master/core/constant_inc.php#L50-L54

vboctor

vboctor

2017-12-08 21:58

manager   ~0058367

You are right. I got confused thinking that ERROR is E_ERROR.

Issue History

Date Modified Username Field Change
2017-12-07 01:46 vboctor New Issue
2017-12-07 01:47 vboctor Summary trigger_error shouldn't use use E_USER_ERROR instead of E_ERROR => trigger_error should use E_USER_ERROR instead of E_ERROR
2017-12-07 01:48 vboctor Summary trigger_error should use E_USER_ERROR instead of E_ERROR => trigger_error() should use E_USER_ERROR instead of E_ERROR
2017-12-07 01:48 vboctor Description Updated View Revisions
2017-12-07 04:34 dregad Note Added: 0058335
2017-12-07 04:35 dregad Note Edited: 0058335 View Revisions
2017-12-08 21:58 vboctor Assigned To => vboctor
2017-12-08 21:58 vboctor Status new => closed
2017-12-08 21:58 vboctor Resolution open => no change required
2017-12-08 21:58 vboctor Note Added: 0058367