File tree 1 file changed +8
-6
lines changed
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ sub _set_ftc_states {
72
72
my $dbh = Bugzilla-> dbh;
73
73
74
74
my $ftc_flags ;
75
- my $db_result ;
75
+ my $db_result = [] ;
76
76
if ($file =~ / ^admin\/ / ) {
77
77
78
78
# admin
@@ -121,11 +121,13 @@ sub _set_ftc_states {
121
121
122
122
my $types = join (' ,' , map { $_ -> id } @$flag_types );
123
123
my $states = " '" . join (" ','" , FLAGTYPE_COMMENT_STATES) . " '" ;
124
- $db_result = $dbh -> selectall_arrayref(
125
- " SELECT type_id AS flagtype, on_status AS state, comment AS text
126
- FROM flagtype_comments
127
- WHERE type_id IN ($types ) AND on_status IN ($states )" , {Slice => {}}
128
- );
124
+ if ($types ) {
125
+ $db_result = $dbh -> selectall_arrayref(
126
+ " SELECT type_id AS flagtype, on_status AS state, comment AS text
127
+ FROM flagtype_comments
128
+ WHERE type_id IN ($types ) AND on_status IN ($states )" , {Slice => {}}
129
+ );
130
+ }
129
131
}
130
132
131
133
foreach my $row (@$db_result ) {
You can’t perform that action at this time.
0 commit comments