From 85d720066f6a4b15ccfe037578e02bcf5403a29f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 13 Jul 2022 12:08:19 +0200 Subject: [PATCH] Add MySQL Native Driver check to update_com.woltlab.wcf_5.6_checkSystemRequirements.php see #4386 --- ..._com.woltlab.wcf_5.6_checkSystemRequirements.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.6_checkSystemRequirements.php b/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.6_checkSystemRequirements.php index 6a42d30afd..55f1ab11a9 100644 --- a/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.6_checkSystemRequirements.php +++ b/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.6_checkSystemRequirements.php @@ -52,3 +52,16 @@ if (!\version_compare($compareSQLVersion, $neededSqlVersion, '>=')) { throw new \RuntimeException($message); } + +$sql = "SELECT 1"; +$statement = $db->prepareStatement($sql); +$statement->execute(); +if ($statement->fetchSingleColumn() !== 1) { + if (WCF::getLanguage()->getFixedLanguageCode() === 'de') { + $message = "Für die Kommunikation mit dem MySQL-Server muss PHPs MySQL Native Driver verwendet werden."; + } else { + $message = "PHP's MySQL Native Driver must be used for communication with the MySQL server."; + } + + throw new \RuntimeException($message); +} -- 2.20.1