Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ac9faad

Browse files
committedOct 13, 2012
The warning message displayed by user_get_field() when called with user
ID '0' (aka NO_USER) was not standard. Throwing Exception instead.
1 parent 6f476eb commit ac9faad

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed
 

‎core/user_api.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -425,8 +425,7 @@ function user_get_row( $p_user_id ) {
425425
*/
426426
function user_get_field( $p_user_id, $p_field_name ) {
427427
if( NO_USER == $p_user_id ) {
428-
trigger_error( 'user_get_field() for NO_USER', WARNING );
429-
return '@null@';
428+
throw new MantisBT\Exception\User_By_UserID_Not_Found( array( $p_user_id ) );
430429
}
431430

432431
$t_user = MantisUser::getByUserID( $p_user_id );

0 commit comments

Comments
 (0)
Please sign in to comment.