View Issue Details

IDProjectCategoryView StatusLast Update
0025631mantisbtadministrationpublic2019-04-21 02:53
Reporterdregad Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version2.11.0 
Target Version2.21.0Fixed in Version2.21.0 
Summary0025631: PHP Notice or incorrect file+line number when displaying DEPRECATED error
Description

When the MantisBT error handler processes an E_USER_DEPRECATED error, it either

  • throws a _Notice: Undefined offset error : 1 in .../errorapi.php on line 241, or
  • returns incorrect file / line number information
Additional Information

Regression introduced by MantisBT master 295526c2

TagsNo tags attached.

Relationships

related to 0025629 closeddregad E_USER_DEPRECATED errors are no longer displayed inline 

Activities

Related Changesets

MantisBT: master 295526c2

2017-12-07 09:35

vboctor


Details Diff
Support exceptions as a way to trigger errors

- Add MantisException, ServiceException, and ClientException.
- Add unhandled exception handler that forward to trigger error on error mode is display.
- Force termination on case of E_USER_ERROR (aliased to ERROR in Mantis).

This allows replacing trigger_error( …, ERROR) with throwing the appropriate exception
while maintaining backward compatibility for UI code.
Affected Issues
0025631
mod - core.php Diff File
rm - core/commands/CommandException.php Diff
mod - core/commands/MonitorCommand.php Diff File
mod - core/error_api.php Diff File
add - core/exceptions/ClientException.php Diff File
add - core/exceptions/MantisException.php Diff File
add - core/exceptions/ServiceException.php Diff File

MantisBT: master 11deb61f

2019-03-21 08:45

dregad


Details Diff
Fix retrieval of deprecated error details

The error_stack_trace() function contains logic to exclude the Error API
internal function calls. However, when it was introduced (see commit
295526c27b3978363530060f399c153e36f4758e), the code processing
E_USER_DEPRECATED errors in error_handler() was not adapted.

This causes the error handler to throw 'Notice: Undefined offset' or
to return incorrect file and line number information

Fixes 0025631
Affected Issues
0025631
mod - core/error_api.php Diff File