Make implicit nullable parameters explicitly nullable.

This is to address a deprecation planned for PHP 8.4.

https://wiki.php.net/rfc/deprecate-implicitly-nullable-types
This commit is contained in:
wn_
2024-03-26 16:38:05 +00:00
parent fea3089bde
commit de00a09538
9 changed files with 26 additions and 26 deletions

View File

@@ -58,7 +58,7 @@ class UserHelper {
}
}
static function authenticate(string $login = null, string $password = null, bool $check_only = false, string $service = null): bool {
static function authenticate(?string $login = null, ?string $password = null, bool $check_only = false, ?string $service = null): bool {
if (!Config::get(Config::SINGLE_USER_MODE)) {
$user_id = false;
$auth_module = false;
@@ -130,7 +130,7 @@ class UserHelper {
}
}
static function load_user_plugins(int $owner_uid, PluginHost $pluginhost = null): void {
static function load_user_plugins(int $owner_uid, ?PluginHost $pluginhost = null): void {
if (!$pluginhost) $pluginhost = PluginHost::getInstance();