Bugzilla – Attachment 140465 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.34 KB, created by
Joonas Kylmälä
on 2022-09-12 15:29:19 UTC
(
hide
)
Description:
Bug 31535: Fix warning - uninitialized value for location
Filename:
MIME Type:
Creator:
Joonas Kylmälä
Created:
2022-09-12 15:29:19 UTC
Size:
1.34 KB
patch
obsolete
>From 96fc7ea273d5a26a96df1dbe6ac67dc302d4166f 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 >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >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> > >Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> >--- > 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.30.2
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