From 6f0ecfc5fc7935d0d689d6c64d168699eae7858c Mon Sep 17 00:00:00 2001 From: Nuno Agostinho Date: Fri, 1 Mar 2024 10:51:54 +0000 Subject: [PATCH] Avoid messages of uninitialized value in unit tests (#1613) --- 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 1e59a1743..a0302fbbe 100644 --- a/modules/Bio/EnsEMBL/VEP/BaseVEP.pm +++ b/modules/Bio/EnsEMBL/VEP/BaseVEP.pm @@ -303,7 +303,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() };