Skip to content

Commit 905214a

Browse files
committed
Merge branch 'QA_5_2'
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2 parents ec2bacc + bf08423 commit 905214a

4 files changed

Lines changed: 6 additions & 16 deletions

File tree

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ phpMyAdmin - ChangeLog
1616
- issue #17366 Fix refresh rate popup on Monitor page
1717
- issue #17577 Fix monitor charts size on RTL languages
1818
- issue #17121 Fix password_hash function incorrectly adding single quotes to password before hashing
19+
- issue #17586 Fix statistics not showing for empty databases
1920

2021
5.2.0 (2022-05-10)
2122
- issue #16521 Upgrade Bootstrap to version 5

libraries/classes/Controllers/Server/DatabasesController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,8 @@ private function getDatabases($primaryInfo, $replicaInfo): array
257257
$statistics = $this->getStatisticsColumns();
258258
if ($this->hasStatistics) {
259259
foreach (array_keys($statistics) as $key) {
260-
$statistics[$key]['raw'] = $database[$key] ?? null;
261-
$totalStatistics[$key]['raw'] += (int) $database[$key] ?? 0;
260+
$statistics[$key]['raw'] = (int) ($database[$key] ?? 0);
261+
$totalStatistics[$key]['raw'] += (int) ($database[$key] ?? 0);
262262
}
263263
}
264264

phpstan-baseline.neon

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1255,11 +1255,6 @@ parameters:
12551255
count: 1
12561256
path: libraries/classes/Controllers/Server/BinlogController.php
12571257

1258-
-
1259-
message: "#^Expression on left side of \\?\\? is not nullable\\.$#"
1260-
count: 1
1261-
path: libraries/classes/Controllers/Server/DatabasesController.php
1262-
12631258
-
12641259
message: "#^Method PhpMyAdmin\\\\Controllers\\\\Server\\\\DatabasesController\\:\\:getDatabases\\(\\) has parameter \\$primaryInfo with no value type specified in iterable type array\\.$#"
12651260
count: 1

psalm-baseline.xml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2656,7 +2656,8 @@
26562656
<MixedArgumentTypeCoercion occurrences="1">
26572657
<code>['db' =&gt; $database['SCHEMA_NAME']]</code>
26582658
</MixedArgumentTypeCoercion>
2659-
<MixedArrayAccess occurrences="13">
2659+
<MixedArrayAccess occurrences="14">
2660+
<code>$database[$key]</code>
26602661
<code>$database[$key]</code>
26612662
<code>$database['DEFAULT_COLLATION_NAME']</code>
26622663
<code>$database['SCHEMA_NAME']</code>
@@ -2679,15 +2680,14 @@
26792680
<code>$databases[$database['SCHEMA_NAME']]</code>
26802681
<code>$databases[$database['SCHEMA_NAME']]</code>
26812682
</MixedArrayOffset>
2682-
<MixedAssignment occurrences="9">
2683+
<MixedAssignment occurrences="8">
26832684
<code>$GLOBALS['db_to_create']</code>
26842685
<code>$GLOBALS['errorUrl']</code>
26852686
<code>$database</code>
26862687
<code>$key</code>
26872688
<code>$key</code>
26882689
<code>$key</code>
26892690
<code>$key</code>
2690-
<code>$statistics[$key]['raw']</code>
26912691
<code>$totalStatistics[$key]['raw']</code>
26922692
</MixedAssignment>
26932693
<MixedOperand occurrences="1">
@@ -2705,12 +2705,6 @@
27052705
<code>$sortBy</code>
27062706
<code>$sortOrder</code>
27072707
</PropertyNotSetInConstructor>
2708-
<RedundantCondition occurrences="1">
2709-
<code>(int) $database[$key]</code>
2710-
</RedundantCondition>
2711-
<TypeDoesNotContainNull occurrences="1">
2712-
<code>0</code>
2713-
</TypeDoesNotContainNull>
27142708
</file>
27152709
<file src="libraries/classes/Controllers/Server/ExportController.php">
27162710
<MixedArgument occurrences="3">

0 commit comments

Comments
 (0)