summaryrefslogtreecommitdiffstats
path: root/modules-available/dnbd3
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/dnbd3')
-rw-r--r--modules-available/dnbd3/inc/dnbd3util.inc.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules-available/dnbd3/inc/dnbd3util.inc.php b/modules-available/dnbd3/inc/dnbd3util.inc.php
index 7d95147a..314c44fe 100644
--- a/modules-available/dnbd3/inc/dnbd3util.inc.php
+++ b/modules-available/dnbd3/inc/dnbd3util.inc.php
@@ -110,7 +110,7 @@ class Dnbd3Util {
*
* @param string $mode always 'proxy'
*/
- public static function runmodeConfigHook(string $machineUuid, string $mode, string $modeData)
+ public static function runmodeConfigHook(string $machineUuid, string $mode, ?string $modeData)
{
$self = Property::getServerIp();
// Get all directly assigned locations
@@ -122,7 +122,7 @@ class Dnbd3Util {
foreach ($res as $row) {
$assignedLocs[] = $row['locationid'];
}
- $modeData = (array)json_decode($modeData, true) + self::defaultRunmodeConfig();
+ $modeData = (array)json_decode($modeData ?? '{}', true) + self::defaultRunmodeConfig();
if (!empty($assignedLocs) && ($modeData['firewall'] ?? false)) {
// Get all sub-locations too
$recursiveLocs = $assignedLocs;