diff options
-rw-r--r-- | web/lib/acctfuncs.inc.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php index 3c8f9edb..22b3ca8d 100644 --- a/web/lib/acctfuncs.inc.php +++ b/web/lib/acctfuncs.inc.php @@ -495,8 +495,11 @@ function search_results_page($O=0,$SB="",$U="",$T="", $result = $dbh->query($q); - while ($row = $result->fetch(PDO::FETCH_ASSOC)) { - $userinfo[] = $row; + $userinfo = array(); + if ($result) { + while ($row = $result->fetch(PDO::FETCH_ASSOC)) { + $userinfo[] = $row; + } } include("account_search_results.php"); |