Bugzilla – Attachment 104637 Details for
Bug 25440
Remove undef and CGI warnings and fix template variables list in circulation rules
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25440: Fix for "uninitialized value in string eq" in smart-rules.pl
Bug-25440-Fix-for-uninitialized-value-in-string-eq.patch (text/plain), 1.35 KB, created by
Andrii Nugged
on 2020-05-10 16:08:55 UTC
(
hide
)
Description:
Bug 25440: Fix for "uninitialized value in string eq" in smart-rules.pl
Filename:
MIME Type:
Creator:
Andrii Nugged
Created:
2020-05-10 16:08:55 UTC
Size:
1.35 KB
patch
obsolete
>From e1dce3dde914f21b7e2fc73d1b7a183772b8aac1 Mon Sep 17 00:00:00 2001 >From: Andrew Nugged <nugged@gmail.com> >Date: Sun, 10 May 2020 14:07:59 +0300 >Subject: [PATCH] Bug 25440: Fix for "uninitialized value in string eq" in > smart-rules.pl > >This warning emitted: > >Use of uninitialized value in string eq at /admin/smart-rules.pl line 289. > >It is solved by one line added to exclude comparison with 'on' string >when variable is 'undef'. >--- > admin/smart-rules.pl | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl >index 6b5a8e9cbd..2458498475 100755 >--- a/admin/smart-rules.pl >+++ b/admin/smart-rules.pl >@@ -284,7 +284,8 @@ elsif ($op eq 'add') { > my $opacitemholds = $input->param('opacitemholds') || 0; > my $article_requests = $input->param('article_requests') || 'no'; > my $overduefinescap = $input->param('overduefinescap') || ''; >- my $cap_fine_to_replacement_price = $input->param('cap_fine_to_replacement_price') eq 'on'; >+ my $cap_fine_to_replacement_price = $input->param('cap_fine_to_replacement_price'); >+ $cap_fine_to_replacement_price = $cap_fine_to_replacement_price && $cap_fine_to_replacement_price eq 'on'; > my $note = $input->param('note'); > $debug and warn "Adding $br, $bor, $itemtype, $fine, $maxissueqty, $maxonsiteissueqty, $cap_fine_to_replacement_price"; > >-- >2.17.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 25440
:
104635
|
104636
|
104637
|
104638
|
104639
|
104640
|
105059
|
105063
|
105985
|
106300
|
106301
|
106302
|
106303
|
106304
|
106305
|
106388