Bugzilla – Attachment 106304 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 $maxsuspensiondays" in smart-rules.pl
Bug-25440-Fix-for-uninitialized-maxsuspensiondays-.patch (text/plain), 1.56 KB, created by
Martin Renvoize (ashimema)
on 2020-06-25 14:41:36 UTC
(
hide
)
Description:
Bug 25440: Fix for "uninitialized $maxsuspensiondays" in smart-rules.pl
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-06-25 14:41:36 UTC
Size:
1.56 KB
patch
obsolete
>From 601aa111cd80cfee1574d0ffab5e20b11bcc4082 Mon Sep 17 00:00:00 2001 >From: Andrew Nugged <nugged@gmail.com> >Date: Tue, 19 May 2020 11:20:41 +0300 >Subject: [PATCH] Bug 25440: Fix for "uninitialized $maxsuspensiondays" in > smart-rules.pl > >This warning emitted: > >Use of uninitialized value $maxsuspensiondays in string eq >at /admin/smart-rules.pl line 257. > >But that not just undef-warning, there is broken logic, >these two lines are mutually contradictory and goes one-by-one: > > $maxsuspensiondays = undef if $maxsuspensiondays eq q||; > $maxsuspensiondays = '' if $maxsuspensiondays eq q||; > >Fix is simple: to make it '' if it comes undef. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > admin/smart-rules.pl | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > >diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl >index ea3b1df3dd..0a33493623 100755 >--- a/admin/smart-rules.pl >+++ b/admin/smart-rules.pl >@@ -254,9 +254,7 @@ elsif ($op eq 'add') { > my $itemtype = $input->param('itemtype'); # item type > my $fine = $input->param('fine'); > my $finedays = $input->param('finedays'); >- my $maxsuspensiondays = $input->param('maxsuspensiondays'); >- $maxsuspensiondays = undef if $maxsuspensiondays eq q||; >- $maxsuspensiondays = '' if $maxsuspensiondays eq q||; >+ my $maxsuspensiondays = $input->param('maxsuspensiondays') || ''; > my $suspension_chargeperiod = $input->param('suspension_chargeperiod') || 1; > my $firstremind = $input->param('firstremind'); > my $chargeperiod = $input->param('chargeperiod'); >-- >2.20.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