From: mark burdett Date: Fri, 22 Feb 2019 23:05:07 +0000 (-0800) Subject: Force utf8mb4 query to throw exception as the check expects. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b9529ed5f2f895ed1fd82219c6e91a0ed9a4d024;p=civicrm-core.git Force utf8mb4 query to throw exception as the check expects. Fixes dev/core#749 --- diff --git a/CRM/Utils/Check/Component/Env.php b/CRM/Utils/Check/Component/Env.php index 4f4b0ffc6d..e20795502b 100644 --- a/CRM/Utils/Check/Component/Env.php +++ b/CRM/Utils/Check/Component/Env.php @@ -939,6 +939,8 @@ class CRM_Utils_Check_Component_Env extends CRM_Utils_Check_Component { return $messages; } + // Force utf8mb4 query to throw exception as the check expects. + $errorScope = CRM_Core_TemporaryErrorScope::useException(); try { // Create a temporary table to avoid implicit commit. CRM_Core_DAO::executeQuery('CREATE TEMPORARY TABLE civicrm_utf8mb4_test (id VARCHAR(255), PRIMARY KEY(id(255))) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC ENGINE=INNODB');