From 862429e5d7cc17e5151e39f37b46054a52bb1328 Mon Sep 17 00:00:00 2001 From: Loz Calver Date: Tue, 13 Oct 2015 09:09:22 +0100 Subject: [PATCH] Only notify users about PDO native mode once --- model/connect/MySQLSchemaManager.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/model/connect/MySQLSchemaManager.php b/model/connect/MySQLSchemaManager.php index 5881e2426..85157de58 100644 --- a/model/connect/MySQLSchemaManager.php +++ b/model/connect/MySQLSchemaManager.php @@ -125,9 +125,16 @@ class MySQLSchemaManager extends DBSchemaManager { } public function checkAndRepairTable($tableName) { + // Flag to ensure we only send the warning about PDO + native mode once + static $pdo_warning_sent = false; + // If running PDO and not in emulated mode, check table will fail if($this->database->getConnector() instanceof PDOConnector && !PDOConnector::is_emulate_prepare()) { - $this->alterationMessage('CHECK TABLE command disabled for PDO in native mode', 'notice'); + if (!$pdo_warning_sent) { + $this->alterationMessage('CHECK TABLE command disabled for PDO in native mode', 'notice'); + $pdo_warning_sent = true; + } + return true; }