Skip to content

Commit

Permalink
Merge pull request phpmyadmin#19343 from kamil-tekiela/mysqlDie
Browse files Browse the repository at this point in the history
Add type hint to mysqlDie
  • Loading branch information
MauricioFauth authored Oct 29, 2024
2 parents 6e795f7 + a9dd5b2 commit 23af05f
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 7 deletions.
2 changes: 0 additions & 2 deletions src/Controllers/Import/ImportController.php
Original file line number Diff line number Diff line change
Expand Up @@ -641,8 +641,6 @@ public function __invoke(ServerRequest $request): Response
false,
$_SESSION['Import_message']['go_back_url'],
);

return $this->response->response();
}

if (Current::$table != $tableFromSql && $tableFromSql !== '') {
Expand Down
2 changes: 0 additions & 2 deletions src/Controllers/Table/GetFieldController.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ public function __invoke(ServerRequest $request): Response
__('MySQL returned an empty result set (i.e. zero rows).'),
$sql,
);

return $this->response->response();
}

$result ??= '';
Expand Down
3 changes: 0 additions & 3 deletions src/DatabaseInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,7 @@ public function query(
$result = $this->tryQuery($query, $connectionType, $options, $cacheAffectedRows);

if (! $result) {
// The following statement will exit
Generator::mysqlDie($this->getError($connectionType), $query);

ResponseRenderer::getInstance()->callExit();
}

return $result;
Expand Down
2 changes: 2 additions & 0 deletions src/Html/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,8 @@ public static function showDocumentationLink(
* @param string $backUrl URL for the "back" link (full path is not required).
* @param bool $exit Whether execution should be stopped or the error message should be returned.
*
* @psalm-return ($exit is true ? never : string|null)
*
* @global string $table The current table.
* @global string $db The current database.
*/
Expand Down

0 comments on commit 23af05f

Please sign in to comment.