From 50c3ce5a82ef9afc64d33b780409806c41c46f25 Mon Sep 17 00:00:00 2001 From: Nuno Agostinho Date: Wed, 14 Feb 2024 09:36:19 +0000 Subject: [PATCH] Avoid messages of uninitialized value in unit tests --- modules/Bio/EnsEMBL/VEP/BaseVEP.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Bio/EnsEMBL/VEP/BaseVEP.pm b/modules/Bio/EnsEMBL/VEP/BaseVEP.pm index c28b02e40..066ec485d 100644 --- a/modules/Bio/EnsEMBL/VEP/BaseVEP.pm +++ b/modules/Bio/EnsEMBL/VEP/BaseVEP.pm @@ -300,7 +300,7 @@ sub registry { my @db_names = map { $_->dbc->dbname } @{ $reg->get_all_DBAdaptors }; my $hostname = ($user eq 'anonymous' ? '' : $user . '@') . "$host:$port"; $self->warning_msg("No database names in $hostname contain version $db_version") - unless grep { /$db_version/ } @db_names; + if defined $db_version and not grep { /$db_version/ } @db_names; } eval { $reg->set_reconnect_when_lost() };