Force utf8mb4 query to throw exception as the check expects.
authormark burdett <mfburdett@gmail.com>
Fri, 22 Feb 2019 23:05:07 +0000 (15:05 -0800)
committermark burdett <mfburdett@gmail.com>
Fri, 22 Feb 2019 23:05:54 +0000 (15:05 -0800)
Fixes dev/core#749

CRM/Utils/Check/Component/Env.php

index 4f4b0ffc6d9f4894b5d0bcb917e8867bd126bbe4..e20795502b7be77adc8426799db04dc92a28899d 100644 (file)
@@ -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');