summaryrefslogtreecommitdiffstats
path: root/inc/property.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2024-01-15 10:57:28 +0100
committerSimon Rettberg2024-01-15 10:57:28 +0100
commite4c51ba6adb08c9cb5605be4ca68ff4d34d713d2 (patch)
tree61bd672e2102ec86f713d7ee9668a7206440c61b /inc/property.inc.php
parent[dozmod] Wording Klausurmodus -> Prüfungsmodus (diff)
downloadslx-admin-e4c51ba6adb08c9cb5605be4ca68ff4d34d713d2.tar.gz
slx-admin-e4c51ba6adb08c9cb5605be4ca68ff4d34d713d2.tar.xz
slx-admin-e4c51ba6adb08c9cb5605be4ca68ff4d34d713d2.zip
[inc/Property] Add type checks now that we use strict_types=1
Diffstat (limited to 'inc/property.inc.php')
-rw-r--r--inc/property.inc.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/inc/property.inc.php b/inc/property.inc.php
index 556596f1..aaf03254 100644
--- a/inc/property.inc.php
+++ b/inc/property.inc.php
@@ -203,9 +203,15 @@ class Property
return true;
}
- public static function getVmStoreConfig()
+ public static function getVmStoreConfig(): array
{
- return json_decode(self::get('vmstore-config'), true);
+ $data = self::get('vmstore-config');
+ if (!is_string($data))
+ return [];
+ $data = json_decode($data, true);
+ if (!is_array($data))
+ return [];
+ return $data;
}
public static function getVmStoreUrl()