Merge pull request #19343 from kamil-tekiela/mysqlDie

Add type hint to mysqlDie
This commit is contained in:
Maurício Meneghini Fauth 2024-10-29 19:57:55 -03:00 committed by GitHub
commit 23af05f650
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 2 additions and 7 deletions

View File

@ -641,8 +641,6 @@ final class ImportController implements InvocableController
false,
$_SESSION['Import_message']['go_back_url'],
);
return $this->response->response();
}
if (Current::$table != $tableFromSql && $tableFromSql !== '') {

View File

@ -81,8 +81,6 @@ final class GetFieldController implements InvocableController
__('MySQL returned an empty result set (i.e. zero rows).'),
$sql,
);
return $this->response->response();
}
$result ??= '';

View File

@ -180,10 +180,7 @@ class DatabaseInterface implements DbalInterface
$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;

View File

@ -679,6 +679,8 @@ class Generator
* @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.
*/