From c5ccb4058454485e723c475e4a3f8585aa2e2f8e Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Wed, 19 Sep 2012 00:05:24 +0800 Subject: [PATCH] [SIGNED-OFF] Bug 8772 - Uninitialized variable triggers error log entry in smart_rules.pl Content-Type: text/plain; charset="utf-8" Changed declartion from: my $op = $input->param('op'); to my $op = $input->param('op') || q{}; in order to give an empty string default preventing error logs from filling needlessly. Signed-off-by: Marc Veron The patch removes warnings like: Use of uninitialized value $op in string eq at... However there is one more warning, but it is not related to $op (addressed by this patch): smart-rules.pl: Use of uninitialized value in string ne at .../admin/smart-rules.pl line 388. --- admin/smart-rules.pl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl index f45ea43..c221d71 100755 --- a/admin/smart-rules.pl +++ b/admin/smart-rules.pl @@ -44,7 +44,7 @@ my ($template, $loggedinuser, $cookie) my $type=$input->param('type'); my $branch = $input->param('branch') || ( C4::Branch::onlymine() ? ( C4::Branch::mybranch() || '*' ) : '*' ); -my $op = $input->param('op'); +my $op = $input->param('op') || q{}; if ($op eq 'delete') { my $itemtype = $input->param('itemtype'); -- 1.7.2.5