[UTIL] Common::config wasn't a proper port from v2, it has to accept one argument only as well

This commit is contained in:
Diogo Peralta Cordeiro 2021-08-12 00:38:18 +01:00 committed by Hugo Sales
parent 33cc9386d2
commit 63cbf4052f
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0

View File

@ -72,9 +72,13 @@ abstract class Common
/** /**
* Access sysadmin's configuration preferences for GNU social * Access sysadmin's configuration preferences for GNU social
*/ */
public static function config(string $section, string $setting) public static function config(string $section, ?string $setting = null)
{ {
return self::$config[$section][$setting]; if ($setting !== null) {
return self::$config[$section][$setting];
} else {
return self::$config[$section] ?? [];
}
} }
/** /**