diff options
author | atomu330 <atomu.work@gmail.com> | 2022-07-18 16:27:31 +0300 |
---|---|---|
committer | MaurĂcio Meneghini Fauth <mauricio@fauth.dev> | 2022-07-19 19:04:59 +0300 |
commit | 6957064cea185c43f7222a215abb19ed17538f21 (patch) | |
tree | d56c73fa1ce7414307acef6e50d0af472e575045 | |
parent | ddb4d5b730a4c9f49ddb7cc0430ae190c69304f6 (diff) |
replace isset to empty
IF statement ! isset($this->uiprefs) was causing issue.
Private property 'uiprefs' is initialized to empty array, so ! isset($this->uiprefs) is always FALSE;
It's not hopefull, so I replace ! isset($this->uiprefs) to empty($this->uiprefs) to fix #17617 bug;
Fixes #17617
Closes #17644
Signed-off-by: Atomu Oku <atomu.work@gmail.com>
Signed-off-by: MaurĂcio Meneghini Fauth <mauricio@fauth.dev>
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | libraries/classes/Table.php | 6 | ||||
-rw-r--r-- | phpstan-baseline.neon | 5 | ||||
-rw-r--r-- | psalm-baseline.xml | 5 |
4 files changed, 4 insertions, 13 deletions
@@ -19,6 +19,7 @@ phpMyAdmin - ChangeLog - issue #17584 It's now possible to browse a database that includes two % in its name - issue Fix PHP 8.2 deprecated string interpolation syntax - issue Some languages are now correctly detected from the HTTP header +- issue #17617 Sorting is correctly remembered when $cfg['RememberSorting'] is true 5.2.0 (2022-05-10) - issue #16521 Upgrade Bootstrap to version 5 diff --git a/libraries/classes/Table.php b/libraries/classes/Table.php index 3925b386a3..380e3966da 100644 --- a/libraries/classes/Table.php +++ b/libraries/classes/Table.php @@ -1867,7 +1867,7 @@ class Table implements Stringable */ public function getUiProp($property) { - if (! isset($this->uiprefs)) { + if (empty($this->uiprefs)) { $this->loadUiPrefs(); } @@ -1937,7 +1937,7 @@ class Table implements Stringable */ public function setUiProp($property, $value, $tableCreateTime = null) { - if (! isset($this->uiprefs)) { + if (empty($this->uiprefs)) { $this->loadUiPrefs(); } @@ -1984,7 +1984,7 @@ class Table implements Stringable */ public function removeUiProp($property) { - if (! isset($this->uiprefs)) { + if (empty($this->uiprefs)) { $this->loadUiPrefs(); } diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 7ac5bbcd1c..ee13ec685e 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -8321,11 +8321,6 @@ parameters: path: libraries/classes/Table.php - - message: "#^Property PhpMyAdmin\\\\Table\\:\\:\\$uiprefs \\(array\\) in isset\\(\\) is not nullable\\.$#" - count: 3 - path: libraries/classes/Table.php - - - message: "#^Property PhpMyAdmin\\\\Table\\:\\:\\$uiprefs type has no value type specified in iterable type array\\.$#" count: 1 path: libraries/classes/Table.php diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 005e4c28b0..d26287b6c7 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -12908,11 +12908,6 @@ </PossiblyNullArgument> </file> <file src="libraries/classes/Table.php"> - <DocblockTypeContradiction occurrences="3"> - <code>isset($this->uiprefs)</code> - <code>isset($this->uiprefs)</code> - <code>isset($this->uiprefs)</code> - </DocblockTypeContradiction> <InvalidReturnStatement occurrences="1"> <code>$tableAutoIncrement ?? ''</code> </InvalidReturnStatement> |