From a887b3d3466df58b92ac3ea5cd6cc4a69ce7d095 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Wed, 20 Oct 2021 10:40:08 -0400 Subject: [PATCH] fixup! EmailNotification: address Use of uninitialized value in numeric eq (==) --- src/lib/Hydra/Plugin/EmailNotification.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/Hydra/Plugin/EmailNotification.pm b/src/lib/Hydra/Plugin/EmailNotification.pm index 6546dd1c..b5f133a6 100644 --- a/src/lib/Hydra/Plugin/EmailNotification.pm +++ b/src/lib/Hydra/Plugin/EmailNotification.pm @@ -12,7 +12,7 @@ use Hydra::Helper::Email; sub isEnabled { my ($self) = @_; - return defined($self->{config}->{email_notification}) && $self->{config}->{email_notification} == 1; + return ($self->{config}->{email_notification} // 0) == 1; } my $template = <