From 2d21c31ce2fdbce931e27fde21ef490c5164300a Mon Sep 17 00:00:00 2001 From: Joe Cooper Date: Sat, 23 May 2026 19:32:55 -0500 Subject: [PATCH] Fix fatal 500 due to strict --- postfix/client.cgi | 2 +- postfix/edit_canonical_mappings.cgi | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/postfix/client.cgi b/postfix/client.cgi index 87a6ae11b..f41408468 100755 --- a/postfix/client.cgi +++ b/postfix/client.cgi @@ -35,7 +35,7 @@ foreach my $r (&list_client_restrictions()) { # Add restrictions with values foreach my $r (&list_multi_client_restrictions()) { - @v = @{$opts{$r}}; + @v = $opts{$r} ? @{$opts{$r}} : (); $vals = undef; if (scalar(@v)) { $vals = join(" ", map { $opts[$_+1] } @v); diff --git a/postfix/edit_canonical_mappings.cgi b/postfix/edit_canonical_mappings.cgi index c380fb44c..f0de843ec 100755 --- a/postfix/edit_canonical_mappings.cgi +++ b/postfix/edit_canonical_mappings.cgi @@ -8,7 +8,7 @@ require './postfix-lib.pl'; ## no critic use strict; use warnings; -our ($aliases, $cb, $tb, %in, %text); +our ($cb, $tb, %in, %text); &ReadParse(); &ui_print_header(undef, $text{'edit_mapping_title'}, ""); @@ -29,7 +29,7 @@ else my $mappingsaliases = &get_aliases(); my %alias; -foreach my $trans (@{$aliases}) +foreach my $trans (@{$mappingsaliases}) { if ($trans->{'number'} == $num) { %alias = %{$trans}; } }