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.
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.
Created attachment 141611 [details] [review] 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.
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.