Bugzilla – Attachment 159338 Details for
Bug 35414
Silence warn related to number_of_copies
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35414: Silence warn related to number_of_copies
Bug-35414-Silence-warn-related-to-numberofcopies.patch (text/plain), 1.51 KB, created by
Magnus Enger
on 2023-11-29 14:02:23 UTC
(
hide
)
Description:
Bug 35414: Silence warn related to number_of_copies
Filename:
MIME Type:
Creator:
Magnus Enger
Created:
2023-11-29 14:02:23 UTC
Size:
1.51 KB
patch
obsolete
>From d4f449099b8c6bd9686e3aaecb43f99ffe98a430 Mon Sep 17 00:00:00 2001 >From: Magnus Enger <magnus@libriotech.no> >Date: Wed, 29 Nov 2023 14:58:08 +0100 >Subject: [PATCH] Bug 35414: Silence warn related to number_of_copies > >To test in ktd: >- Tail the logs with "sudo tail -f /var/log/koha/kohadev/plack*.log" >- Find a record in the staff client >- Add an item to the record >- Observe "[WARN] Argument "" isn't numeric in subroutine entry ..." > in /var/log/koha/kohadev/plack-intranet-error.log >- Apply this patch >- restart_all >- Tail the logs again >- Add another item >- Observe the absence of the earlier warning > >Thanks to Jonathan Druart for suggesting this particular solution! >--- > cataloguing/additem.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl >index bd7b297109..f92e3467fd 100755 >--- a/cataloguing/additem.pl >+++ b/cataloguing/additem.pl >@@ -238,7 +238,7 @@ if ($op eq "additem") { > my $add_duplicate_submit = $input->param('add_duplicate_submit'); > my $add_multiple_copies_submit = $input->param('add_multiple_copies_submit'); > my $save_as_template_submit = $input->param('save_as_template_submit'); >- my $number_of_copies = min( scalar $input->param('number_of_copies'), 1000 ); # TODO refine hardcoded maximum? >+ my $number_of_copies = min( scalar $input->param('number_of_copies') || 0, 1000 ); # TODO refine hardcoded maximum? > > my @columns = Koha::Items->columns; > my $item = Koha::Item->new; >-- >2.34.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 35414
:
159338
|
159365
|
159425