Bug 7325 - Editing a list generates errors in the log
Summary: Editing a list generates errors in the log
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Lists (show other bugs)
Version: 3.6
Hardware: All All
: PATCH-Sent (DO NOT USE) minor (vote)
Assignee: Owen Leonard
QA Contact: Ian Walls
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-06 21:03 UTC by Owen Leonard
Modified: 2013-12-05 19:59 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Proposed fix (1.28 KB, patch)
2011-12-06 21:08 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 7325 - Editing a list generates errors in the log (1.29 KB, patch)
2011-12-13 08:11 UTC, Chris Cormack
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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.