Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Correct tag retrieval on SQL Server when no tags are defined

Fix #13363 : Application Failure when trying to select an issue
  • Loading branch information...
commit 59b1fff943f39dc5ffd7594780ddac4b793f9505 1 parent 61c7a98
Robert Munteanu rombert authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 core/tag_api.php
5 core/tag_api.php
View
@@ -421,6 +421,11 @@ function tag_get_candidates_for_bug( $p_bug_id ) {
while( $row = db_fetch_array( $result ) ) {
$t_subquery_results[] = (int)$row;
}
+
+ if ( count ( $t_subquery_results ) == 0 ) {
+ return array();
+ }
+
$query = "SELECT id, name, description FROM $t_tag_table WHERE id IN ( " . implode( ', ', $t_subquery_results ) . ')';
} else {
$query = "SELECT id, name, description FROM $t_tag_table WHERE id IN (
Please sign in to comment.
Something went wrong with that request. Please try again.