From 392f66f15231bc1d9f3e976f3b847470e7863d56 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Fri, 5 Jan 2018 00:28:56 -0500 Subject: [PATCH] More issues fixed - Replaced sizeof by count - Used DBM::is_result() --- mod/admin.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/mod/admin.php b/mod/admin.php index a39a189f8..ca4158ce4 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -671,7 +671,7 @@ function admin_page_queue(App $a) return replace_macros($t, array( '$title' => t('Administration'), '$page' => t('Inspect Queue'), - '$count' => sizeof($r), + '$count' => count($r), 'id_header' => t('ID'), '$to_header' => t('Recipient Name'), '$url_header' => t('Recipient Profile'), @@ -836,11 +836,8 @@ function admin_page_site_post(App $a) $upds = implode(", ", $upd); - - - $q = sprintf("UPDATE %s SET %s;", $table_name, $upds); - $r = q($q); - if (!$r) { + $r = q("UPDATE %s SET %s;", $table_name, $upds); + if (!DBM::is_result($r)) { notice("Failed updating '$table_name': " . dba::errorMessage()); goaway('admin/site'); }