From 9cece83fee9862e649802d036c4dd060c726fe65 Mon Sep 17 00:00:00 2001 From: ruan Date: Sun, 24 Apr 2016 12:23:46 +0200 Subject: [PATCH] Do early table check --- inc/settings.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inc/settings.php b/inc/settings.php index c729bfb..8fcc4da 100644 --- a/inc/settings.php +++ b/inc/settings.php @@ -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); }