Check query return value in search_results_page()
commit6090c2ae8b6b33af79cae2ed63ebe5209d0729b3
authorLukas Fleischer <lfleischer@archlinux.org>
Tue, 18 Apr 2017 06:36:29 +0000 (18 08:36 +0200)
committerLukas Fleischer <lfleischer@archlinux.org>
Tue, 18 Apr 2017 06:38:13 +0000 (18 08:38 +0200)
treec24ad4dabdf1b2a31a2405eb4c33665048bf35f8
parent5553d01ab362e7731da0bb238cc188faacdd3d7e
Check query return value in search_results_page()

Instead of unconditionally calling fetch on the return value of query(),
error out early if the value evaluates to false. Also, make sure that
the results array is always initialized, even if the result set is
empty.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
web/lib/acctfuncs.inc.php