Add some return-type guards in CStoreEditor.pm.
authorJason Stephenson <jstephenson@mvlc.org>
Mon, 8 Aug 2011 14:24:18 +0000 (10:24 -0400)
committerJason Stephenson <jstephenson@mvlc.org>
Mon, 8 Aug 2011 14:24:18 +0000 (10:24 -0400)
commita5e9a3c4fb7e317ba7633fa7f230d7de849ba709
tree24c6d5100b5c6da86151a3274004979eb28d2f34
parent04008a5bece9c12d2e6ce48ed7ed11eb5d537289
Add some return-type guards in CStoreEditor.pm.

Check that return types from $self->json_query are arrayrefs before
actually using the returned values in the allowed and objects_allowed
methods of CStoreEditor.pm.

This should prevent some crashes that I've seen when permission checks
fail for some unknown reason (database timeouts?) while retrieving and
paying bills.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Open-ILS/src/perlmods/lib/OpenILS/Utils/CStoreEditor.pm