Skip to content

Commit 23af05f

Browse files
Merge pull request #19343 from kamil-tekiela/mysqlDie
Add type hint to mysqlDie
2 parents 6e795f7 + a9dd5b2 commit 23af05f

4 files changed

Lines changed: 2 additions & 7 deletions

File tree

‎src/Controllers/Import/ImportController.php‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -641,8 +641,6 @@ public function __invoke(ServerRequest $request): Response
641641
false,
642642
$_SESSION['Import_message']['go_back_url'],
643643
);
644-
645-
return $this->response->response();
646644
}
647645

648646
if (Current::$table != $tableFromSql && $tableFromSql !== '') {

‎src/Controllers/Table/GetFieldController.php‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ public function __invoke(ServerRequest $request): Response
8181
__('MySQL returned an empty result set (i.e. zero rows).'),
8282
$sql,
8383
);
84-
85-
return $this->response->response();
8684
}
8785

8886
$result ??= '';

‎src/DatabaseInterface.php‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,7 @@ public function query(
180180
$result = $this->tryQuery($query, $connectionType, $options, $cacheAffectedRows);
181181

182182
if (! $result) {
183-
// The following statement will exit
184183
Generator::mysqlDie($this->getError($connectionType), $query);
185-
186-
ResponseRenderer::getInstance()->callExit();
187184
}
188185

189186
return $result;

‎src/Html/Generator.php‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,8 @@ public static function showDocumentationLink(
679679
* @param string $backUrl URL for the "back" link (full path is not required).
680680
* @param bool $exit Whether execution should be stopped or the error message should be returned.
681681
*
682+
* @psalm-return ($exit is true ? never : string|null)
683+
*
682684
* @global string $table The current table.
683685
* @global string $db The current database.
684686
*/

0 commit comments

Comments
 (0)