Skip to content

Commit

Permalink
Add ChangeLog entry for #17586
Browse files Browse the repository at this point in the history
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
  • Loading branch information
MauricioFauth committed Jun 11, 2022
1 parent bc61c2f commit bf08423
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 16 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Expand Up @@ -14,6 +14,7 @@ phpMyAdmin - ChangeLog
- issue #17366 Fix refresh rate popup on Monitor page
- issue #17577 Fix monitor charts size on RTL languages
- issue #17121 Fix password_hash function incorrectly adding single quotes to password before hashing
- issue #17586 Fix statistics not showing for empty databases

5.2.0 (2022-05-10)
- issue #16521 Upgrade Bootstrap to version 5
Expand Down
4 changes: 2 additions & 2 deletions libraries/classes/Controllers/Server/DatabasesController.php
Expand Up @@ -255,8 +255,8 @@ private function getDatabases($primaryInfo, $replicaInfo): array
$statistics = $this->getStatisticsColumns();
if ($this->hasStatistics) {
foreach (array_keys($statistics) as $key) {
$statistics[$key]['raw'] = (int) $database[$key] ?? 0;
$totalStatistics[$key]['raw'] += (int) $database[$key] ?? 0;
$statistics[$key]['raw'] = (int) ($database[$key] ?? 0);
$totalStatistics[$key]['raw'] += (int) ($database[$key] ?? 0);
}
}

Expand Down
5 changes: 0 additions & 5 deletions phpstan-baseline.neon
Expand Up @@ -1345,11 +1345,6 @@ parameters:
count: 1
path: libraries/classes/Controllers/Server/BinlogController.php

-
message: "#^Expression on left side of \\?\\? is not nullable\\.$#"
count: 1
path: libraries/classes/Controllers/Server/DatabasesController.php

-
message: "#^Method PhpMyAdmin\\\\Controllers\\\\Server\\\\DatabasesController\\:\\:getDatabases\\(\\) has parameter \\$primaryInfo with no value type specified in iterable type array\\.$#"
count: 1
Expand Down
12 changes: 3 additions & 9 deletions psalm-baseline.xml
Expand Up @@ -2402,7 +2402,8 @@
<MixedArgumentTypeCoercion occurrences="1">
<code>['db' =&gt; $database['SCHEMA_NAME']]</code>
</MixedArgumentTypeCoercion>
<MixedArrayAccess occurrences="13">
<MixedArrayAccess occurrences="14">
<code>$database[$key]</code>
<code>$database[$key]</code>
<code>$database['DEFAULT_COLLATION_NAME']</code>
<code>$database['SCHEMA_NAME']</code>
Expand All @@ -2425,13 +2426,12 @@
<code>$databases[$database['SCHEMA_NAME']]</code>
<code>$databases[$database['SCHEMA_NAME']]</code>
</MixedArrayOffset>
<MixedAssignment occurrences="7">
<MixedAssignment occurrences="6">
<code>$database</code>
<code>$key</code>
<code>$key</code>
<code>$key</code>
<code>$key</code>
<code>$statistics[$key]['raw']</code>
<code>$totalStatistics[$key]['raw']</code>
</MixedAssignment>
<MixedOperand occurrences="1">
Expand All @@ -2446,12 +2446,6 @@
<code>$sortBy</code>
<code>$sortOrder</code>
</PropertyNotSetInConstructor>
<RedundantCondition occurrences="1">
<code>(int) $database[$key]</code>
</RedundantCondition>
<TypeDoesNotContainNull occurrences="1">
<code>0</code>
</TypeDoesNotContainNull>
</file>
<file src="libraries/classes/Controllers/Server/ExportController.php">
<MixedArgument occurrences="6">
Expand Down

0 comments on commit bf08423

Please sign in to comment.