diff --git a/libraries/classes/DatabaseInterface.php b/libraries/classes/DatabaseInterface.php index d1687e7f67..3adfde20c5 100644 --- a/libraries/classes/DatabaseInterface.php +++ b/libraries/classes/DatabaseInterface.php @@ -487,10 +487,10 @@ class DatabaseInterface implements DbalInterface // this is why we fall back to SHOW TABLE STATUS even for MySQL >= 50002 if ($tables === []) { $sql = 'SHOW TABLE STATUS FROM ' . Util::backquote($database); - if ($table || ($tbl_is_group === true) || $table_type) { + if (($table !== '' && $table !== []) || ($tbl_is_group === true) || $table_type) { $sql .= ' WHERE'; $needAnd = false; - if ($table || ($tbl_is_group === true)) { + if (($table !== '' && $table !== []) || ($tbl_is_group === true)) { if (is_array($table)) { $sql .= ' `Name` IN (\'' . implode( @@ -585,7 +585,7 @@ class DatabaseInterface implements DbalInterface } if ($limit_count) { - $each_tables = array_slice($each_tables, $limit_offset, $limit_count); + $each_tables = array_slice($each_tables, $limit_offset, $limit_count, true); } $tables[$database] = Compatibility::getISCompatForGetTablesFull($each_tables, $database);