From 63cbf4052fddefd926cfec237eda0388fd8e5dbd Mon Sep 17 00:00:00 2001 From: Diogo Peralta Cordeiro Date: Thu, 12 Aug 2021 00:38:18 +0100 Subject: [PATCH] [UTIL] Common::config wasn't a proper port from v2, it has to accept one argument only as well --- src/Util/Common.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Util/Common.php b/src/Util/Common.php index afa2fcca29..a09a41b855 100644 --- a/src/Util/Common.php +++ b/src/Util/Common.php @@ -72,9 +72,13 @@ abstract class Common /** * 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] ?? []; + } } /**