View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0023706 | mantisbt | administration | public | 2017-12-07 02:21 | 2022-04-24 11:18 |
Reporter | vboctor | Assigned To | vboctor | ||
Priority | normal | Severity | major | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Product Version | 2.9.0 | ||||
Target Version | 2.11.0 | Fixed in Version | 2.11.0 | ||
Summary | 0023706: trigger_error() with errors must terminate scripts rather than being config based | ||||
Description | The MantisBT code is written with the assumption that a
Recommendation:
We could also consider deprecating The above is a required step in our transition to exceptions. I'm thinking with core APIs we could throw exceptions instead of calling | ||||
Tags | No tags attached. | ||||
@vboctor I didn't have a deeper look, maybe it's worth to have a look at what dhx implemented in |
|
I support deprecating the ability to continue after a fatal error. IIRC, I already modified error API a few years ago, to ensure this happens for PHP E_ERRORs regardless of how $g_display_errors is set. I'm not so keen on deprecating $g_display_errors entirely, because I believe it is a very useful feature to be able to choose the desired behavior for different error types (hide / display inline / halt), especially during development. I would only agree to that if the new Exceptions model somehow allows the same behavior (or maybe I should say functionality). |
|
I have just made the change where ERROR (E_USER_ERROR) always terminate the script as part of the following PR: https://github.com/mantisbt/mantisbt/pull/1240 |
|
MantisBT: master f9d45aab 2017-12-07 08:39 Details Diff |
Force E_USER_ERROR to HALT The code assumes that such errors will halt executions, so such errors shouldn’t ever resume. Fixes 0023706 |
Affected Issues 0023706 |
|
mod - core/error_api.php | Diff File | ||
MantisBT: master c816588d 2017-12-08 16:59 Details Diff |
Enforce halting of scripts on errors Enforce for E_ERROR and E_RECOVERABLE_ERROR and not just E_USER_ERROR. Updated documentation, config_defaults_inc.php samples and defaults. Fixes 0023706 |
Affected Issues 0023706 |
|
mod - config_defaults_inc.php | Diff File | ||
mod - core/error_api.php | Diff File | ||
mod - docbook/Admin_Guide/en-US/config/logging.xml | Diff File |