Skip to content

Commit

Permalink
Handle invalid user id
Browse files Browse the repository at this point in the history
Failure to check user_get_row()'s return value results in system notice
'Trying to access array offset on value of type bool' when an invalid
user_id parameter is given to manage_user_edit_page.php.

Fixes #27573
  • Loading branch information
dregad committed Nov 21, 2020
1 parent 6fbb9ce commit ac22c04
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions manage_user_edit_page.php
Expand Up @@ -80,6 +80,10 @@
}

$t_user = user_get_row( $t_user_id );
if( !$t_user ) {
error_parameters( $t_user_id );
trigger_error( ERROR_USER_BY_ID_NOT_FOUND, ERROR);
}

# Ensure that the account to be updated is of equal or lower access to the
# current user.
Expand Down

0 comments on commit ac22c04

Please sign in to comment.