1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 07:36:44 +02:00

Explicitly mark nullable params (thanks to @dg)

This commit is contained in:
Jakub Vrana
2025-04-01 19:09:46 +02:00
parent 634b0aaacf
commit 01ea001f22
5 changed files with 7 additions and 7 deletions

View File

@@ -386,7 +386,7 @@ function set_session(string $key, $val) {
}
/** Get authenticated URL */
function auth_url(string $vendor, ?string $server, string $username, string $db = null): string {
function auth_url(string $vendor, ?string $server, string $username, ?string $db = null): string {
$uri = remove_from_uri(implode("|", array_keys(SqlDriver::$drivers))
. "|username|ext|"
. ($db !== null ? "db|" : "")
@@ -412,7 +412,7 @@ function is_ajax(): bool {
/** Send Location header and exit
* @param ?string $location null to only set a message
*/
function redirect(?string $location, string $message = null): void {
function redirect(?string $location, ?string $message = null): void {
if ($message !== null) {
restart_session();
$_SESSION["messages"][preg_replace('~^[^?]*~', '', ($location !== null ? $location : $_SERVER["REQUEST_URI"]))][] = $message;