From 89eda8f0a929b893da8965827bab7848fec28192 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Mon, 19 Oct 2015 12:21:42 -0700 Subject: [PATCH] Fix undefined variable warning in find_factoid --- PBot/Factoids.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PBot/Factoids.pm b/PBot/Factoids.pm index b20ef3e6..01e5c334 100644 --- a/PBot/Factoids.pm +++ b/PBot/Factoids.pm @@ -269,7 +269,7 @@ sub find_factoid { # check factoids foreach my $channel (sort keys %{ $self->{factoids}->hash }) { if($exact_channel) { - if($exact_trigger == 1) { + if(defined $exact_trigger && $exact_trigger == 1) { next unless $from eq lc $channel; } else { next unless $from eq lc $channel or $channel eq '.*';