Bugzilla – Attachment 64957 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.53 KB, created by
Marcel de Rooy
on 2017-07-10 12:19:55 UTC
(
hide
)
Description:
Bug 18921: Resolve a few warnings in C4/XSLT.pm
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-07-10 12:19:55 UTC
Size:
2.53 KB
patch
obsolete
>From 08840d0e4fa3344543541df8b9c8a7fea7bee4a7 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 >Content-Type: text/plain; charset=utf-8 > >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. >--- > 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