mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-23 08:29:06 +00:00
Close cursor after query
This commit is contained in:
parent
e693ba8d7f
commit
40b132a686
@ -19,6 +19,7 @@ class Check {
|
||||
$uuid = $row['uuid'];
|
||||
}
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
if (!isset($uuid)) {
|
||||
$name = htmlspecialchars($name, ENT_QUOTES, 'UTF-8');
|
||||
$this->println("$name " . $page->lang->check_notjoin);
|
||||
@ -58,6 +59,7 @@ class Check {
|
||||
$this->println("Banned permanently.");
|
||||
}
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
*/
|
||||
} catch (PDOException $ex) {
|
||||
Settings::handle_error($page->settings, $ex);
|
||||
|
@ -20,6 +20,7 @@ class History {
|
||||
if ($count_st->execute() && ($row = $count_st->fetch()) !== null) {
|
||||
$counts[$type] = $row['count'];
|
||||
}
|
||||
$count_st->closeCursor();
|
||||
$sel = $page->get_selection($table);
|
||||
|
||||
$limit = $page->settings->limit_per_page;
|
||||
@ -37,6 +38,7 @@ class History {
|
||||
array_push($array, $row);
|
||||
}
|
||||
}
|
||||
$st->closeCursor();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -135,6 +135,8 @@ class Page {
|
||||
|
||||
$st->execute();
|
||||
|
||||
$st->closeCursor();
|
||||
|
||||
return $st;
|
||||
} catch (PDOException $ex) {
|
||||
Settings::handle_error($this->settings, $ex);
|
||||
@ -224,6 +226,7 @@ class Page {
|
||||
$this->uuid_name_cache[$uuid] = $banner;
|
||||
return $banner;
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
$this->uuid_name_cache[$uuid] = null;
|
||||
return null;
|
||||
}
|
||||
|
3
info.php
3
info.php
@ -53,7 +53,7 @@ abstract class Info {
|
||||
class BanInfo extends Info {
|
||||
function basic_info($row, $player_name) {
|
||||
$page = $this->page;
|
||||
|
||||
|
||||
return array(
|
||||
$page->lang->info_banned_player => $this->punished_avatar($player_name, $row),
|
||||
$page->lang->info_banned_by => $this->moderator_avatar($row),
|
||||
@ -179,3 +179,4 @@ if ($st->execute(array($id))) {
|
||||
|
||||
$page->print_footer();
|
||||
}
|
||||
$st->closeCursor();
|
||||
|
Loading…
x
Reference in New Issue
Block a user