View Issue Details

IDProjectCategoryView StatusLast Update
0037005mantisbtbugtrackerpublic2026-04-06 08:32
Reporterdregad Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.22.0 
Target Version2.28.2Fixed in Version2.28.2 
Summary0037005: 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
extract(): Argument 0000001 ($array) must be of type array, bool given

Additional Information

Regression introduced by 0025850

TagsNo tags attached.

Relationships

related to 0025850 closeddregad PHP Notices in User API 
related to 0037006 resolveddregad Abort user verification early if given user id is not valid 

Activities

There are no notes attached to this issue.

Related Changesets

MantisBT: master-2.28 e2d7dcda

2026-04-06 08:19

dregad


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