diff --git a/api/soap/mc_tag_api.php b/api/soap/mc_tag_api.php index faf19ca549..521de2fff1 100644 --- a/api/soap/mc_tag_api.php +++ b/api/soap/mc_tag_api.php @@ -167,15 +167,15 @@ function mci_tag_set_for_issue ( $p_issue_id, array $p_tags, $p_user_id ) { ); } } else if( isset( $t_tag['name'] ) ) { - $t_tag = tag_get_by_name( $t_tag['name'] ); - if( $t_tag === false ) { + $t_get_tag = tag_get_by_name( $t_tag['name'] ); + if( $t_get_tag === false ) { throw new ClientException( - "Tag {$t_tag['name']} not found.", + "Tag '{$t_tag['name']}' not found.", ERROR_TAG_NOT_FOUND ); } - $t_tag_id = $t_tag['id']; + $t_tag_id = $t_get_tag['id']; } else { throw new ClientException( 'Tag without id or name.', diff --git a/core/commands/IssueAddCommand.php b/core/commands/IssueAddCommand.php index d7b2b1fe23..9bf2106c36 100644 --- a/core/commands/IssueAddCommand.php +++ b/core/commands/IssueAddCommand.php @@ -221,7 +221,7 @@ function validate() { foreach( $t_issue['tags'] as $t_tag ) { if( $t_tag['id'] === -1 ) { throw new ClientException( - sprintf( "User '%d' can't create tag '%s'.", $this->user_id, $t_new_tag ), + sprintf( "User '%d' can't create tag '%s'.", $this->user_id, $t_tag['name'] ), ERROR_TAG_NOT_FOUND ); } }