Permalink
Browse files

Avoid use of an undefined value as an ARRAY reference

  • Loading branch information...
1 parent 98defe8 commit 96d23f286202809df5c9525d4789b816d0644a03 @fangly fangly committed Jun 24, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 Bio/DB/Taxonomy/list.pm
View
@@ -399,7 +399,7 @@ sub get_taxon {
sub get_taxonids {
my ($self, $name) = @_;
- return wantarray() ? @{$self->{name_to_id}->{$name}} : $self->{name_to_id}->{$name}->[0];
+ return wantarray() ? @{$self->{name_to_id}->{$name} || []} : $self->{name_to_id}->{$name}->[0];
}
*get_taxonid = \&get_taxonids;

0 comments on commit 96d23f2

Please sign in to comment.