In C4/XSLT.pm : elsif ( exists $itemtypes->{ $item->effective_itemtype } && $itemtypes->{ $item->effective_itemtype }->{notforloan} == 1 ) itemtype.notforloan is null by default, its generated a warning in logs.
Created attachment 117752 [details] [review] Bug 27861: Warning in C4/XSLT.pm - use of uninitialized value in numeric eq (==) In C4/XSLT.pm : elsif ( exists $itemtypes->{ $item->effective_itemtype } && $itemtypes->{ $item->effective_itemtype }->{notforloan} == 1 ) itemtype.notforloan is null by default, its generated a warning in logs. Test plan : 1) Choose a record with itemtype.notforloan = NULL 2) Display the record using XSLT 3) See patch removed warning
I couldn't reproduce this error. The data in my test system didn't have NULL in itemtypes.notforloan, it had zero. But I tested both ways.
(In reply to Owen Leonard from comment #2) > I couldn't reproduce this error. The data in my test system didn't have NULL > in itemtypes.notforloan, it had zero. But I tested both ways. Ahhh I found it : You need to perform a search (with XSLT display) at OPAC. Staff interface does not call this code. Please retry.
Created attachment 119731 [details] [review] Bug 27861: Warning in C4/XSLT.pm - use of uninitialized value in numeric eq (==) In C4/XSLT.pm : elsif ( exists $itemtypes->{ $item->effective_itemtype } && $itemtypes->{ $item->effective_itemtype }->{notforloan} == 1 ) itemtype.notforloan is null by default, its generated a warning in logs. Test plan : 1) Choose a record with itemtype.notforloan = NULL 2) Perform a search in the OPAC which will return results which include the record using XSLT 3) See patch removed warning Signed-off-by: Owen Leonard <oleonard@myacpl.org>
(In reply to Fridolin Somers from comment #3) > You need to perform a search (with XSLT display) at OPAC. That was it! I modified the test plan in the commit message.
Created attachment 119852 [details] [review] Bug 27861: Warning in C4/XSLT.pm - use of uninitialized value in numeric eq (==) In C4/XSLT.pm : elsif ( exists $itemtypes->{ $item->effective_itemtype } && $itemtypes->{ $item->effective_itemtype }->{notforloan} == 1 ) itemtype.notforloan is null by default, its generated a warning in logs. Test plan : 1) Choose a record with itemtype.notforloan = NULL 2) Perform a search in the OPAC which will return results which include the record using XSLT 3) See patch removed warning Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Pushed to master for 21.05, thanks to everybody involved!
Pushed to 20.11.x for 20.11.06
Pushed to 20.05.x for 20.05.12
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.