mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-23 16:32:45 +00:00
Fixed more possible error instances
This commit is contained in:
parent
534e0d2ca2
commit
5074cbfc5f
@ -19,6 +19,7 @@ function __construct($page) {
|
||||
(SELECT COUNT(*) FROM $t_warnings) AS c_warnings,
|
||||
(SELECT COUNT(*) FROM $t_kicks) AS c_kicks");
|
||||
($row = $st->fetch(PDO::FETCH_ASSOC)) or die('Failed to fetch row counts.');
|
||||
$st->closeCursor();
|
||||
$this->count = array(
|
||||
'bans.php' => $row['c_bans'],
|
||||
'mutes.php' => $row['c_mutes'],
|
||||
|
@ -401,7 +401,9 @@ class Page {
|
||||
$where = $this->where_append($this->name === "kicks" ? "" : $this->settings->active_query);
|
||||
$where .= "(uuid <> '#offline#' AND uuid IS NOT NULL)";
|
||||
|
||||
$result = $this->conn->query("SELECT COUNT(*) AS count FROM $table $where")->fetch(PDO::FETCH_ASSOC);
|
||||
$st = $this->conn->query("SELECT COUNT(*) AS count FROM $table $where");
|
||||
$result = $st->fetch(PDO::FETCH_ASSOC);
|
||||
$st->closeCursor();
|
||||
$total = $result['count'];
|
||||
}
|
||||
|
||||
|
@ -143,6 +143,7 @@ final class Settings {
|
||||
|
||||
$st = $this->conn->query("SELECT * FROM " . $this->table['servers'] . " LIMIT 1;");
|
||||
$st->fetch();
|
||||
$st->closeCursor();
|
||||
} catch (PDOException $e) {
|
||||
Settings::handle_error($this, $e);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user