]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 2057695: fix precedence issues with negation (#231)
authorDave Miller <justdave@bugzilla.org>
Sat, 25 Jul 2026 20:42:01 +0000 (16:42 -0400)
committerGitHub <noreply@github.com>
Sat, 25 Jul 2026 20:42:01 +0000 (16:42 -0400)
r=justdave

Co-authored-by: Frédéric Buclin <LpSolit@gmail.com>
Bugzilla/Bug.pm
Bugzilla/Template/Plugin/Hook.pm

index 4af294071847c1dabd7b60e4af7b8fbe3fed0e7e..81d43bb0e0f4e53badfc577bfcef97ccaccf66e9 100644 (file)
@@ -587,7 +587,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)
index e315ab79ec7e8985150d422b25f001d354247f6e..f937a8f7c8d6baf740ceb511b41f93a82588d7c3 100644 (file)
@@ -33,7 +33,7 @@ sub process {
   $template ||= $context->stash->{component}->{name};
 
   # sanity check:
-  if (!$template =~ /[\w\.\/\-_\\]+/) {
+  if ($template !~ /[\w\.\/\-_\\]+/) {
     ThrowCodeError('template_invalid', {name => $template});
   }