View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0025850 | mantisbt | bugtracker | public | 2019-06-10 12:11 | 2021-01-17 09:07 |
Reporter | dregad | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Target Version | 2.22.0 | Fixed in Version | 2.22.0 | ||
Summary | 0025850: PHP Notices in User API | ||||
Description | Noticed the following issues while working on PHPUnit tests:
| ||||
Tags | No tags attached. | ||||
MantisBT: master 16a46b50 2019-01-01 09:55 Committer: dregad Details Diff |
Refactor user_pref_api db queries Refactor db queries that still use hardcoded parameters. |
Affected Issues 0025850, 0027113 |
|
mod - core/user_pref_api.php | Diff File | ||
MantisBT: master 0d2b817f 2019-06-10 06:08 Details Diff |
Fix user_pref_cache_array_rows if fetch_all fails DbQuery::fetch_all() can return false if the query execution fails. In that case, the foreach triggers a PHP "Invalid argument supplied for foreach()" warning. Also, improve code readability by storing the user ID in a variable to avoid repeated typecasts. Fixes 0025850 |
Affected Issues 0025850 |
|
mod - core/user_pref_api.php | Diff File | ||
MantisBT: master 2cee661c 2019-06-10 06:11 Details Diff |
Fix PHP Notice in user_cache_row() If the function receives an invalid user ID, it will issue an Undefined offset notice, as it does not check for actual existence of the ID in the users' cache after calling user_cache_array_rows(). PHPDoc does state that a valid user ID is expected, but since the function includes error handling code, it makes sense to account for this case, unlikely as it may be. Fixes 0025850 |
Affected Issues 0025850 |
|
mod - core/user_api.php | Diff File |