Skip to content

Commit f0f71c5

Browse files
Merge pull request phpmyadmin#20122 from thomasvincent/fix/serverrequest-search-controller
fix: migrate $_REQUEST to ServerRequest in SearchController
2 parents 30f030d + c3e2ecf commit f0f71c5

3 files changed

Lines changed: 1 addition & 10 deletions

File tree

phpstan-baseline.neon

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,12 +1608,6 @@ parameters:
16081608
count: 1
16091609
path: src/Controllers/Database/RoutinesController.php
16101610

1611-
-
1612-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
1613-
identifier: empty.notAllowed
1614-
count: 1
1615-
path: src/Controllers/Database/SearchController.php
1616-
16171611
-
16181612
message: '#^Parameter \#1 \$database of method PhpMyAdmin\\Database\\CentralColumns\:\:deleteColumnsFromList\(\) expects string, mixed given\.$#'
16191613
identifier: argument.type

psalm-baseline.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -926,9 +926,6 @@
926926
<PossiblyUnusedMethod>
927927
<code><![CDATA[__construct]]></code>
928928
</PossiblyUnusedMethod>
929-
<RiskyTruthyFalsyComparison>
930-
<code><![CDATA[empty($_REQUEST['ajax_page_request'])]]></code>
931-
</RiskyTruthyFalsyComparison>
932929
</file>
933930
<file src="src/Controllers/Database/SqlAutoCompleteController.php">
934931
<PossiblyUnusedMethod>

src/Controllers/Database/SearchController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function __invoke(ServerRequest $request): Response
9090
}
9191

9292
// If we are in an Ajax request, we need to exit after displaying all the HTML
93-
if ($request->isAjax() && empty($_REQUEST['ajax_page_request'])) {
93+
if ($request->isAjax() && ! $request->has('ajax_page_request')) {
9494
return $this->response->response();
9595
}
9696

0 commit comments

Comments
 (0)