[Bug 31737] New: Fix CGI::param called in list context warning in smart-rules.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31737 Bug ID: 31737 Summary: Fix CGI::param called in list context warning in smart-rules.pl Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Circulation Assignee: slavashishkin@gmail.com Reporter: slavashishkin@gmail.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com, nugged@gmail.com When UnseenRenewals syspref is disabled, the form param is not passed at all when parsed it comes as undef, but the code tries directly to do strip_non_numeric call on it. Thus the 'undef' warning. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31737 --- Comment #1 from Slava Shishkin <slavashishkin@gmail.com> --- When UnseenRenewals syspref is disabled, the form param is not passed at all when parsed it comes as undef, but the code tries directly to do strip_non_numeric call on it. Thus the 'undef' warnings: [WARN] Use of uninitialized value $string in substitution (s///) at /kohadevbox/koha/admin/smart-rules.pl line 760. [WARN] Use of uninitialized value $string in pattern match (m//) at /kohadevbox/koha/admin/smart-rules.pl line 761. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31737 Slava Shishkin <slavashishkin@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Fix CGI::param called in |Fix undef warnings around |list context warning in |unseen_renewals_allowed in |smart-rules.pl |smart-rules.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31737 Slava Shishkin <slavashishkin@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Fix undef warnings around |Undef warnings around |unseen_renewals_allowed in |unseen_renewals_allowed in |smart-rules.pl |smart-rules.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31737 --- Comment #2 from Slava Shishkin <slavashishkin@gmail.com> --- Created attachment 141611 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141611&action=edit Bug 31737: Fix undef warnings around unseen_renewals_allowed in smart-rules.pl Trivial fix. To reproduce: 1. Create or edit a rule on /cgi-bin/koha/admin/smart-rules.pl - i.e. submit the form (make POST request) 2. Notice the mentioned above warning in plack-intranet-error.log 3. Apply the patch. 4. Repeat step 1. 5. That warning in log file should be no more. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31737 Slava Shishkin <slavashishkin@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31737 Slava Shishkin <slavashishkin@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |29012 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012 [Bug 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31737 Kevin Carnes <kevin.carnes@ub.lu.se> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kevin.carnes@ub.lu.se Status|Needs Signoff |RESOLVED Resolution|--- |FIXED --- Comment #3 from Kevin Carnes <kevin.carnes@ub.lu.se> --- Thanks for catching this. It's been decided I should update the patch since it hasn't been released yet. I went ahead and included your fix. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org