mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-23 16:32:45 +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",
|
||||
'kicks' => "${table_prefix}kicks",
|
||||
'history' => "${table_prefix}history",
|
||||
'servers' => "${table_prefix}servers",
|
||||
);
|
||||
|
||||
$this->active_query = "";
|
||||
@ -119,6 +120,9 @@ final class Settings {
|
||||
|
||||
try {
|
||||
$this->conn = new PDO($dsn, $username, $password, $options);
|
||||
|
||||
$st = $this->conn->query("SELECT * FROM " . $this->table['servers'] . " LIMIT 1;");
|
||||
$st->fetch();
|
||||
} catch (PDOException $e) {
|
||||
Settings::handle_error($this, $e);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user