From 4b2c25342755cd0dd9cefe2abdfaf14e0b4f4882 Mon Sep 17 00:00:00 2001 From: 3D-I <480857+3D-I@users.noreply.github.com> Date: Thu, 5 Nov 2020 05:07:54 +0100 Subject: [PATCH] [ticket/16629] Fix ACP get_database_size() for MySql 8 PHPBB3-16629 --- phpBB/includes/functions_admin.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 08e275a0ed..60eb7b616d 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -2849,9 +2849,9 @@ function get_database_size() if ($row) { - $version = $row['mysql_version']; - - $db_name = $db->get_db_name(); + $version = $row['mysql_version']; + $mysql_engine = ['MyISAM', 'InnoDB', 'Aria']; + $db_name = $db->get_db_name(); $sql = 'SHOW TABLE STATUS FROM ' . $db_name; @@ -2860,7 +2860,7 @@ function get_database_size() while ($row = $db->sql_fetchrow($result)) { if (isset($row['Engine']) - && ($row['Engine'] == ('MyISAM' || 'InnoDB' || 'Aria')) + && in_array($row['Engine'], $mysql_engine) ) { $database_size += $row['Data_length'] + $row['Index_length'];