MantisBT: master 0d2b817f

Author Committer Branch Timestamp Parent
dregad dregad master 2019-06-10 06:08 master 7ed1892d
Affected Issues  0025850: PHP Notices in User API
Changeset

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

mod - core/user_pref_api.php Diff File