Redirect to outdated-plugin instead of tables-not-found if bans table exists

This commit is contained in:
ruan 2018-04-19 05:52:51 +02:00
parent 13b298bce7
commit 813b72d2b0
No known key found for this signature in database
GPG Key ID: 0D2EC1C52E469C0B

View File

@ -209,7 +209,14 @@ final class Settings {
}
}
if (strstr($message, "Base table or view not found:")) {
$settings->redirect("error/tables-not-found.php");
try {
$st = $settings->conn->query("SELECT * FROM " . $settings->table['bans'] . " LIMIT 1;");
$st->fetch();
$st->closeCursor();
} catch (PDOException $e) {
$settings->redirect("error/tables-not-found.php");
}
$settings->redirect("error/outdated-plugin.php");
}
if (strstr($message, "Unknown column")) {
$settings->redirect("error/outdated-plugin.php");