LP 115706: Avoid Internal Server Errors with Hold Count Retrieval user/dyrcona/lp1155706-avoid-internal-server-errors
authorJason Stephenson <jason@sigio.com>
Tue, 7 Aug 2018 14:02:10 +0000 (10:02 -0400)
committerJason Stephenson <jason@sigio.com>
Tue, 7 Aug 2018 14:02:10 +0000 (10:02 -0400)
commit09e3ffe09e6e56c9581c22ecd326471aa4ac24c1
tree397baa1a941d0b3b17a6ce96c6980d599453325e
parentbeee20c5b0a63bf8248a630686f2fb262d4789ac
LP 115706: Avoid Internal Server Errors with Hold Count Retrieval

It can happen that the query to get a record's hold count can run too
long and timeout or fail for some other reason.  When this happens,
the user sees an Internal Server Error.  The underlying cause is the
following Perl error:

Can't use an undefined value as an ARRAY reference at
/usr/local/share/perl/5.22.1/OpenILS/Application/Circ/Holds.pm line
4264.

This commit rearranges the code around that line to avoid this
particular undefined value reference error.

Signed-off-by: Jason Stephenson <jason@sigio.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm