Bugzilla – Attachment 140364 Details for
Bug 31535
Fix a staff warn or two
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31535: Fix warning - uninitialized value for location
Bug-31535-Fix-warning---uninitialized-value-for-lo.patch (text/plain), 1.23 KB, created by
Marcel de Rooy
on 2022-09-09 07:45:34 UTC
(
hide
)
Description:
Bug 31535: Fix warning - uninitialized value for location
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2022-09-09 07:45:34 UTC
Size:
1.23 KB
patch
obsolete
>From 29b1ac033317f0893949e49149efa265df1b9681 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 9 Sep 2022 07:35:53 +0000 >Subject: [PATCH] Bug 31535: Fix warning - uninitialized value for location >Content-Type: text/plain; charset=utf-8 > >In Koha/Item.pm line 169 (line number has been changed) > >Test plan: >You need location to be NULL when storing. >Otherwise follow this reasoning: > What happens when location is undefined? It is autovivified to > empty string in the string compare (ne), so not equal to CART > and PROC. The subcondition is true before and after this patch. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > Koha/Item.pm | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > >diff --git a/Koha/Item.pm b/Koha/Item.pm >index e5d4bbccd6..d2f337772d 100644 >--- a/Koha/Item.pm >+++ b/Koha/Item.pm >@@ -179,8 +179,7 @@ sub store { > > > if ( exists $updated_columns{location} >- and $self->location ne 'CART' >- and $self->location ne 'PROC' >+ and ( !defined($self->location) or $self->location !~ /^(CART|PROC)$/ ) > and not exists $updated_columns{permanent_location} ) > { > $self->permanent_location( $self->location ); >-- >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 31535
:
140343
|
140362
|
140363
|
140364
|
140463
|
140464
|
140465