diff options
Diffstat (limited to 'inc/property.inc.php')
-rw-r--r-- | inc/property.inc.php | 10 |
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() |