diff options
author | Simon Rettberg | 2023-12-04 16:24:00 +0100 |
---|---|---|
committer | Simon Rettberg | 2023-12-04 16:24:00 +0100 |
commit | 0b98dc983c87ef2f86363419a839b6ad86d5d5be (patch) | |
tree | bf09de1f1c56243ed4754907aaaa280635e8ca49 /modules-available/locations/inc | |
parent | Update translations (diff) | |
download | slx-admin-0b98dc983c87ef2f86363419a839b6ad86d5d5be.tar.gz slx-admin-0b98dc983c87ef2f86363419a839b6ad86d5d5be.tar.xz slx-admin-0b98dc983c87ef2f86363419a839b6ad86d5d5be.zip |
[locations] Fix wrong variable type error
Diffstat (limited to 'modules-available/locations/inc')
-rw-r--r-- | modules-available/locations/inc/location.inc.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules-available/locations/inc/location.inc.php b/modules-available/locations/inc/location.inc.php index 59e6d2b6..807f8577 100644 --- a/modules-available/locations/inc/location.inc.php +++ b/modules-available/locations/inc/location.inc.php @@ -8,7 +8,7 @@ class Location private static $treeCache = false; private static $subnetMapCache = false; - public static function getTree() + public static function getTree(): array { if (self::$treeCache === false) { self::$treeCache = self::queryLocations(); @@ -166,15 +166,15 @@ class Location * Get nested array of all the locations and children of given locationid(s). * * @param int[]|int $idList List of location ids - * @param bool $locationTree used in recursive calls, don't pass + * @param ?array $locationTree used in recursive calls, don't pass * @return array list of passed locations plus their children */ - public static function getRecursive($idList, bool $locationTree = false): array + public static function getRecursive($idList, ?array $locationTree = null): array { if (!is_array($idList)) { $idList = array($idList); } - if ($locationTree === false) { + if ($locationTree === null) { $locationTree = self::getTree(); } $ret = array(); |