Tuned up PdfLatex font settings
[civicrm-core.git] / Civi / Install / Requirements.php
index e4423e8f51e2e39d162a8af835e8b11865ac6959..e7c9581106cbbe902167211a8b4d886d4c28ea43 100644 (file)
@@ -23,6 +23,9 @@ class Requirements {
    */
   const REQUIREMENT_ERROR = 2;
 
+  /**
+   * @var array
+   */
   protected $system_checks = [
     'checkMemory',
     'checkServerVariables',
@@ -106,7 +109,7 @@ class Requirements {
   /**
    * Generates a mysql connection
    *
-   * @param $db_confic array
+   * @param $db_config array
    * @return object mysqli connection
    */
   protected function connect($db_config) {
@@ -488,7 +491,8 @@ class Requirements {
       return $results;
     }
 
-    $r = mysqli_query($conn, "SHOW VARIABLES LIKE 'thread_stack'"); // bytes => kb
+    // bytes => kb
+    $r = mysqli_query($conn, "SHOW VARIABLES LIKE 'thread_stack'");
     if (!$r) {
       $results['severity'] = $this::REQUIREMENT_ERROR;
       $results['details'] = 'Could not query thread_stack value';
@@ -609,6 +613,7 @@ class Requirements {
       return $results;
     }
 
+    mysqli_query($conn, 'DROP TABLE IF EXISTS civicrm_utf8mb4_test');
     $r = mysqli_query($conn, 'CREATE TABLE civicrm_utf8mb4_test (id VARCHAR(255), PRIMARY KEY(id(255))) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC ENGINE=INNODB');
     if (!$r) {
       $results['severity'] = $this::REQUIREMENT_WARNING;
@@ -616,7 +621,7 @@ class Requirements {
       mysqli_close($conn);
       return $results;
     }
-    mysqli_query('DROP TABLE civicrm_utf8mb4_test');
+    mysqli_query($conn, 'DROP TABLE civicrm_utf8mb4_test');
 
     // Ensure that the MySQL driver supports utf8mb4 encoding.
     $version = mysqli_get_client_info($conn);