From 4331b3b154457b8c8bb6eab20009d47664ffa0f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Buclin?= Date: Sat, 25 Jul 2026 15:57:31 -0400 Subject: [PATCH] Bug 2057695: fix precedent issues with negation r=justdave --- Bugzilla/Bug.pm | 2 +- Bugzilla/Template/Plugin/Hook.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 3222d7961..a44108fca 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -617,7 +617,7 @@ sub possible_duplicates { my $products = $params->{products} || []; my $limit = $params->{limit} || MAX_POSSIBLE_DUPLICATES; $limit = MAX_POSSIBLE_DUPLICATES if $limit > MAX_POSSIBLE_DUPLICATES; - $products = [$products] if !ref($products) eq 'ARRAY'; + $products = [$products] if ref($products) ne 'ARRAY'; my $orig_limit = $limit; detaint_natural($limit) diff --git a/Bugzilla/Template/Plugin/Hook.pm b/Bugzilla/Template/Plugin/Hook.pm index d81f47549..ce562680c 100644 --- a/Bugzilla/Template/Plugin/Hook.pm +++ b/Bugzilla/Template/Plugin/Hook.pm @@ -33,7 +33,7 @@ sub process { $template ||= $context->stash->{component}->{name}; # sanity check: - if (!$template =~ /[\w\.\/\-_\\]+/) { + if ($template !~ /[\w\.\/\-_\\]+/) { ThrowCodeError('template_invalid', {name => $template}); }