Bugzilla – Attachment 163225 Details for
Bug 36277
t/db_dependent/api/v1/transfer_limits.t is failing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36277: Avoid useless warnings
Bug-36277-Avoid-useless-warnings.patch (text/plain), 1.51 KB, created by
Tomás Cohen Arazi (tcohen)
on 2024-03-15 12:10:18 UTC
(
hide
)
Description:
Bug 36277: Avoid useless warnings
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2024-03-15 12:10:18 UTC
Size:
1.51 KB
patch
obsolete
>From 199fbca0b00a81e541cbce40da79daf542650275 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 15 Mar 2024 09:05:55 -0300 >Subject: [PATCH] Bug 36277: Avoid useless warnings > >As mentioned on bug 36329, this endpoint is only used with one of this >parameters: > >* item_type >* collection_code > >The other will be NULL both on the DB and the (deserialized) request >body. For the data from the DB, the author added `|| q{}` but missed to >do so on the incoming parameters when generates the hash key. > >This generates the following warnings when using from the UI: > >[2024/03/15 11:42:51] [WARN] Use of uninitialized value in sprintf at /kohadevbox/koha/Koha/REST/V1/TransferLimits.pm line 146. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/REST/V1/TransferLimits.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/REST/V1/TransferLimits.pm b/Koha/REST/V1/TransferLimits.pm >index cba63776c1d..b38c3e87eb7 100644 >--- a/Koha/REST/V1/TransferLimits.pm >+++ b/Koha/REST/V1/TransferLimits.pm >@@ -143,7 +143,7 @@ sub batch_add { > > my $dbic_params = Koha::Item::Transfer::Limits->new->attributes_from_api($params); > my %existing_limits = >- map { sprintf( "%s:%s:%s:%s", $_->fromBranch, $_->toBranch, $_->itemtype, $_->ccode ) => 1 } >+ map { sprintf( "%s:%s:%s:%s", $_->fromBranch, $_->toBranch, $_->itemtype // q{}, $_->ccode // q{} ) => 1 } > Koha::Item::Transfer::Limits->search($dbic_params)->as_list; > > my @results; >-- >2.44.0
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 36277
:
163134
|
163135
|
163189
|
163190
|
163199
|
163200
| 163225