diff --git a/libraries/classes/DatabaseInterface.php b/libraries/classes/DatabaseInterface.php
index 7d5f7a0a8b..d1687e7f67 100644
--- a/libraries/classes/DatabaseInterface.php
+++ b/libraries/classes/DatabaseInterface.php
@@ -620,11 +620,12 @@ class DatabaseInterface implements DbalInterface
*/
public function getVirtualTables(string $db): array
{
- $tables_full = array_keys($this->getTablesFull($db));
+ /** @var string[] $tables_full */
+ $tables_full = array_column($this->getTablesFull($db), 'TABLE_NAME');
$views = [];
foreach ($tables_full as $table) {
- $table = $this->getTable($db, (string) $table);
+ $table = $this->getTable($db, $table);
if (! $table->isView()) {
continue;
}
diff --git a/libraries/classes/Util.php b/libraries/classes/Util.php
index 7c2cc2e9ca..335cd35f8e 100644
--- a/libraries/classes/Util.php
+++ b/libraries/classes/Util.php
@@ -325,7 +325,9 @@ class Util
$tableGroups = [];
- foreach ($tables as $tableName => $table) {
+ foreach ($tables as $table) {
+ /** @var string $tableName */
+ $tableName = $table['TABLE_NAME'];
$table['Rows'] = self::checkRowCount($db, $table);
// in $group we save the reference to the place in $table_groups
@@ -2288,18 +2290,15 @@ class Util
}
}
- $tables = array_merge(
- $groupTable,
- $dbi->getTablesFull(
- $db,
- $groupWithSeparator !== false ? $groupWithSeparator : '',
- $groupWithSeparator !== false,
- $limitOffset,
- $limitCount,
- $sort,
- $sortOrder,
- $tableType
- )
+ $tables = $groupTable + $dbi->getTablesFull(
+ $db,
+ $groupWithSeparator !== false ? $groupWithSeparator : '',
+ $groupWithSeparator !== false,
+ $limitOffset,
+ $limitCount,
+ $sort,
+ $sortOrder,
+ $tableType
);
}
@@ -2402,10 +2401,7 @@ class Util
}
if (count($names) > 0) {
- $tables = array_merge(
- $tables,
- $dbi->getTablesFull($db, $names)
- );
+ $tables += $dbi->getTablesFull($db, $names);
}
if ($GLOBALS['cfg']['NaturalOrder']) {
diff --git a/psalm-baseline.xml b/psalm-baseline.xml
index 974aa633a2..c4ed981ed6 100644
--- a/psalm-baseline.xml
+++ b/psalm-baseline.xml
@@ -14441,14 +14441,12 @@
$table['Name']
$user
-
+
$columnNames
- $tableName
- $tableName
uksort($tables, 'strnatcasecmp')
uksort($tables, 'strnatcasecmp')
-
+
$_SESSION['tmpval']['table_limit_offset']
$row['Cardinality']
$row['Column_name']
@@ -14470,6 +14468,7 @@
$row['Seq_in_index']
$row['Seq_in_index']
$row['Sub_part']
+ $table['TABLE_NAME']
$_SESSION['tmpval']['table_limit_offset']