mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-24 00:42:43 +00:00
Do early table check
This commit is contained in:
parent
d4e9230f74
commit
9cece83fee
@ -87,6 +87,7 @@ final class Settings {
|
|||||||
'warnings' => "${table_prefix}warnings",
|
'warnings' => "${table_prefix}warnings",
|
||||||
'kicks' => "${table_prefix}kicks",
|
'kicks' => "${table_prefix}kicks",
|
||||||
'history' => "${table_prefix}history",
|
'history' => "${table_prefix}history",
|
||||||
|
'servers' => "${table_prefix}servers",
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->active_query = "";
|
$this->active_query = "";
|
||||||
@ -119,6 +120,9 @@ final class Settings {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$this->conn = new PDO($dsn, $username, $password, $options);
|
$this->conn = new PDO($dsn, $username, $password, $options);
|
||||||
|
|
||||||
|
$st = $this->conn->query("SELECT * FROM " . $this->table['servers'] . " LIMIT 1;");
|
||||||
|
$st->fetch();
|
||||||
} catch (PDOException $e) {
|
} catch (PDOException $e) {
|
||||||
Settings::handle_error($this, $e);
|
Settings::handle_error($this, $e);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user