Skip to content

Commit

Permalink
Fix error when category default handler is deleted
Browse files Browse the repository at this point in the history
- Fix the error in edit category page.
- Don't assign to default handler on reporting an issue unless user exists.

Fixes #20867
  • Loading branch information
vboctor committed May 3, 2016
1 parent 13bda67 commit 45ed88b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/bug_api.php
Expand Up @@ -504,7 +504,7 @@ function create() {
$t_result = db_query( $t_query, array( $this->category_id ) );
$t_handler = db_result( $t_result );

if( $t_handler !== false ) {
if( $t_handler !== false && user_exists( $t_handler ) ) {
$this->handler_id = $t_handler;
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/print_api.php
Expand Up @@ -297,7 +297,7 @@ function print_user_option_list( $p_user_id, $p_project_id = null, $p_access = A
$p_user_id != NO_USER &&
!array_key_exists( $p_user_id, $t_users )
) {
$t_row = user_get_row( $p_user_id );
$t_row = user_cache_row( $p_user_id, /* trigger_error */ false );
if( $t_row === false ) {
# User doesn't exist - create a dummy record for display purposes
$t_name = user_get_name( $p_user_id );
Expand Down

0 comments on commit 45ed88b

Please sign in to comment.