Bugzilla – Attachment 66857 Details for
Bug 18921
Resolve a few warnings in C4/XSLT.pm
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18921: Resolve a few warnings in C4/XSLT.pm
Bug-18921-Resolve-a-few-warnings-in-C4XSLTpm.patch (text/plain), 2.55 KB, created by
Katrin Fischer
on 2017-09-05 21:15:11 UTC
(
hide
)
Description:
Bug 18921: Resolve a few warnings in C4/XSLT.pm
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2017-09-05 21:15:11 UTC
Size:
2.55 KB
patch
obsolete
>From 0f4e41bb29da54a1973ff8816e5199036a818858 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 10 Jul 2017 14:15:09 +0200 >Subject: [PATCH] Bug 18921: Resolve a few warnings in C4/XSLT.pm > >Resolves warnings like: > >Use of uninitialized value in hash element at C4/XSLT.pm line 262. >Use of uninitialized value in numeric eq (==) at C4/XSLT.pm line 267. >Use of uninitialized value $status in concatenation (.) or string at C4/XSLT.pm line 300. > >Note: Line numbers are not exactly the same anymore. > >Test plan: >[1] Enable XSLT view in OPAC >[2] Without this patch, you will probably have some of these warnings when > doing some opac searches. >[3] Apply this patch. Check the logs again. > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > C4/XSLT.pm | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/C4/XSLT.pm b/C4/XSLT.pm >index 8813da0..bf2647a 100644 >--- a/C4/XSLT.pm >+++ b/C4/XSLT.pm >@@ -292,12 +292,12 @@ sub buildKohaItemsNamespace { > > my $reservestatus = C4::Reserves::GetReserveStatus( $item->{itemnumber} ); > >- if ( $itemtypes->{ $item->{itype} }->{notforloan} || $item->{notforloan} || $item->{onloan} || $item->{withdrawn} || $item->{itemlost} || $item->{damaged} || >+ if ( ( $item->{itype} && $itemtypes->{ $item->{itype} }->{notforloan} ) || $item->{notforloan} || $item->{onloan} || $item->{withdrawn} || $item->{itemlost} || $item->{damaged} || > (defined $transfertwhen && $transfertwhen ne '') || $item->{itemnotforloan} || (defined $reservestatus && $reservestatus eq "Waiting") ){ > if ( $item->{notforloan} < 0) { > $status = "On order"; > } >- if ( $item->{itemnotforloan} > 0 || $item->{notforloan} > 0 || $itemtypes->{ $item->{itype} }->{notforloan} == 1 ) { >+ if ( $item->{itemnotforloan} && $item->{itemnotforloan} > 0 || $item->{notforloan} && $item->{notforloan} > 0 || $item->{itype} && $itemtypes->{ $item->{itype} }->{notforloan} && $itemtypes->{ $item->{itype} }->{notforloan} == 1 ) { > $status = "reference"; > } > if ($item->{onloan}) { >@@ -333,7 +333,7 @@ sub buildKohaItemsNamespace { > . "<holdingbranch>$holdingbranch</holdingbranch>" > . "<location>$location</location>" > . "<ccode>$ccode</ccode>" >- . "<status>$status</status>" >+ . "<status>".( $status // q{} )."</status>" > . "<itemcallnumber>$itemcallnumber</itemcallnumber>" > . "<stocknumber>$stocknumber</stocknumber>" > . "</item>"; >-- >2.1.4
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 18921
:
64957
|
66857
|
66956