diff --git a/modules/Bio/EnsEMBL/DBSQL/OntologyTermAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/OntologyTermAdaptor.pm
index 8b3d5a44754bdef86ef0119b90de5a62e2b7c773..8ef0b41e1b0911480f6a81745b18b52cadac459a 100644
--- a/modules/Bio/EnsEMBL/DBSQL/OntologyTermAdaptor.pm
+++ b/modules/Bio/EnsEMBL/DBSQL/OntologyTermAdaptor.pm
@@ -528,6 +528,7 @@ WHERE   synonym.term_id = ?);
   my $synonym;
   $sth->bind_col( 1, \$synonym );
 
+  my @synonyms;
   while ( $sth->fetch() ) {
     push( @synonyms, $synonym );
   }