Bug 7325

Summary: Editing a list generates errors in the log
Product: Koha Reporter: Owen Leonard <oleonard>
Component: ListsAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Ian Walls <koha.sekjal>
Severity: minor    
Priority: PATCH-Sent (DO NOT USE) CC: chris, paul.poulain
Version: 3.6   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Proposed fix
Bug 7325 - Editing a list generates errors in the log

Description Owen Leonard 2011-12-06 21:03:07 UTC
The script tries to build the pagination menu but lacks the right parameters for it:

Use of uninitialized value $totitems in division (/) at C4/VirtualShelves/Page.pm line 371.
Use of uninitialized value $totitems in modulus (%) at C4/VirtualShelves/Page.pm line 371.
Comment 1 Owen Leonard 2011-12-06 21:08:41 UTC Comment hidden (obsolete)
Comment 2 Chris Cormack 2011-12-13 08:11:31 UTC
Now it no longer tries to build the pagination bar when editing an list (which makes sense there is nothing to paginate).
Comment 3 Chris Cormack 2011-12-13 08:11:54 UTC
Created attachment 6735 [details] [review]
Bug 7325 - Editing a list generates errors in the log

Checking for variables before trying to use them in
building the pagination menu

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Comment 4 Paul Poulain 2011-12-15 16:12:02 UTC
QA comment: tiny patch, remove log noise, passed QA

patch pushed, please test

PS: totitem could also have been quieted by defaulting to 0. That could have been cleaner, but that could also be debated for years, so accepting this one ;-)
Comment 5 Jared Camins-Esakov 2012-05-23 12:13:17 UTC
Included in 3.6 prior to 3.6.5.