Bug 8772 - Uninitialized variable triggers error log entry in smart_rules.pl

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 <veron@veron.ch>

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.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This commit is contained in:
Mark Tompsett 2012-09-19 00:05:24 +08:00 committed by Jared Camins-Esakov
parent 5f7287dfa4
commit 8ec4beb4df
1 changed files with 1 additions and 1 deletions

View File

@ -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');