File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 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 {
7272  my  $dbh  = Bugzilla-> dbh;
7373
7474  my  $ftc_flags ;
75-   my  $db_result ;
75+   my  $db_result  = [] ;
7676  if  ($file  =~ / ^admin\/ / 
7777
7878    #  admin
@@ -121,11 +121,13 @@ sub _set_ftc_states {
121121
122122    my  $types  = join (' ,' map  { $_ -> id } @$flag_types );
123123    my  $states  = " '" join (" ','" " '" 
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+     }
129131  }
130132
131133  foreach  my  $row  (@$db_result ) {
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments