3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-20 10:59:29 +01:00

Fix undefined variable warning

This commit is contained in:
Pragmatic Software 2020-02-15 07:15:26 -08:00
parent 7dd0196c54
commit edf735f88a

View File

@ -270,6 +270,7 @@ sub unset {
sub exists { sub exists {
my ($self, $primary_index, $secondary_index, $data_index) = @_; my ($self, $primary_index, $secondary_index, $data_index) = @_;
return 0 if not defined $primary_index;
$primary_index = lc $primary_index; $primary_index = lc $primary_index;
return 0 if not exists $self->{hash}->{$primary_index}; return 0 if not exists $self->{hash}->{$primary_index};
return 1 if not defined $secondary_index; return 1 if not defined $secondary_index;