From 825d68ee8696a2c3f3a2a95c0d148015f02a5ae9 Mon Sep 17 00:00:00 2001 From: Aleisha Date: Sun, 13 Dec 2015 22:24:05 +0000 Subject: [PATCH] Bug 14153: Noisy warns in admin/transport-cost-matrix.pl To test: 1) Go to Admin -> Transport cost matrix 2) Notice the warns in the error log 3) Apply the patch and refresh page 4) Notice page still works but no warns in error log Signed-off-by: Jonathan Druart Amended patch: Init a $op variable, if it must be reused later. Signed-off-by: Brendan A Gallagher --- admin/transport-cost-matrix.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/transport-cost-matrix.pl b/admin/transport-cost-matrix.pl index 31973068ec..383318cf94 100755 --- a/admin/transport-cost-matrix.pl +++ b/admin/transport-cost-matrix.pl @@ -42,7 +42,7 @@ my ($template, $loggedinuser, $cookie) }); my $use_transport_cost_matrix = C4::Context->preference("UseTransportCostMatrix"); -my $update = $input->param('op') eq 'set-cost-matrix'; +my $update = ( $input->param('op') // '' ) eq 'set-cost-matrix'; my ($cost_matrix, $have_matrix); unless ($update) { -- 2.39.5