View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0037005 | mantisbt | bugtracker | public | 2026-04-06 07:57 | 2026-04-06 08:32 |
| Reporter | dregad | Assigned To | dregad | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Product Version | 2.22.0 | ||||
| Target Version | 2.28.2 | Fixed in Version | 2.28.2 | ||
| Summary | 0037005: user_get_row() does not throw exception when given invalid user id | ||||
| Description | user_get_row() calls user_cache_row() with default value (true) for $p_trigger_errors parameter, meaning an exception should be thrown when an invalid user ID is provided, but it does not - the function just returns false. | ||||
| Steps To Reproduce | I noticed this while following a link from an old password reset notification email. It was sent to a test user that had been deleted, resulting in an unexpected PHP error in verify.php, line 67: http://127.0.0.1/mantis/verify.php?id={NON_EXISTING_USER_ID}&confirm_hash=XXXX INTERNAL APPLICATION ERROR | ||||
| Additional Information | Regression introduced by 0025850 | ||||
| Tags | No tags attached. | ||||
|
MantisBT: master-2.28 e2d7dcda 2026-04-06 08:19 Details Diff |
Fix record not found check in user_cache_row() Using empty() instead of !isset(), so both false and null trigger the exception. Regression from 2cee661cbdf9bf607a75586b8376f74675c924af. Fixes 0037005 |
Affected Issues 0037005 |
|
| mod - core/user_api.php | Diff File | ||