diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index b65cb4eb0c..b07f58b3b1 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -5280,11 +5280,6 @@ parameters: count: 1 path: src/Controllers/Sql/SqlController.php - - - message: "#^Parameter \\#2 \\$isGotoFile of method PhpMyAdmin\\\\Sql\\:\\:executeQueryAndSendQueryResponse\\(\\) expects bool, mixed given\\.$#" - count: 1 - path: src/Controllers/Sql/SqlController.php - - message: "#^Parameter \\#2 \\$signature of static method PhpMyAdmin\\\\Core\\:\\:checkSqlQuerySignature\\(\\) expects string, mixed given\\.$#" count: 1 diff --git a/psalm-baseline.xml b/psalm-baseline.xml index b9e09ac572..972f08ae4d 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -3207,7 +3207,6 @@ - @@ -3232,7 +3231,6 @@ - diff --git a/src/Controllers/Sql/SqlController.php b/src/Controllers/Sql/SqlController.php index da793d164f..6e4b09148d 100644 --- a/src/Controllers/Sql/SqlController.php +++ b/src/Controllers/Sql/SqlController.php @@ -53,7 +53,6 @@ class SqlController extends AbstractController $GLOBALS['message_to_show'] ??= null; $GLOBALS['disp_message'] ??= null; $GLOBALS['complete_query'] ??= null; - $GLOBALS['is_gotofile'] ??= null; $GLOBALS['back'] ??= null; $GLOBALS['table_from_sql'] ??= null; @@ -80,7 +79,7 @@ class SqlController extends AbstractController /** * Defines the url to return to in case of error in a sql statement */ - $GLOBALS['is_gotofile'] = true; + $isGotofile = true; $config = Config::getInstance(); if (empty($GLOBALS['goto'])) { if (empty($GLOBALS['table'])) { @@ -186,7 +185,7 @@ class SqlController extends AbstractController * Sets or modifies the $goto variable if required */ if ($GLOBALS['goto'] === Url::getFromRoute('/sql')) { - $GLOBALS['is_gotofile'] = false; + $isGotofile = false; $GLOBALS['goto'] = Url::getFromRoute('/sql', [ 'db' => $GLOBALS['db'], 'table' => $GLOBALS['table'], @@ -196,7 +195,7 @@ class SqlController extends AbstractController $this->response->addHTML($this->sql->executeQueryAndSendQueryResponse( $statementInfo, - $GLOBALS['is_gotofile'], + $isGotofile, $GLOBALS['db'], $GLOBALS['table'], $GLOBALS['import_text'] ?? null,