Make sure event names is always an array
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
da84b36186
commit
c3061e6929
|
@ -127,7 +127,7 @@ class Application extends \OCP\AppFramework\App {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}, $eventNames);
|
}, $eventNames ?? []);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -145,7 +145,7 @@ class Manager implements IManager {
|
||||||
$operations[$operation] = $operations[$row['class']] ?? [];
|
$operations[$operation] = $operations[$row['class']] ?? [];
|
||||||
$operations[$operation][$entity] = $operations[$operation][$entity] ?? [];
|
$operations[$operation][$entity] = $operations[$operation][$entity] ?? [];
|
||||||
|
|
||||||
$operations[$operation][$entity] = array_unique(array_merge($operations[$operation][$entity], $eventNames));
|
$operations[$operation][$entity] = array_unique(array_merge($operations[$operation][$entity], $eventNames ?? []));
|
||||||
}
|
}
|
||||||
$result->closeCursor();
|
$result->closeCursor();
|
||||||
|
|
||||||
|
@ -589,7 +589,7 @@ class Manager implements IManager {
|
||||||
|
|
||||||
$operation['checks'][] = $check;
|
$operation['checks'][] = $check;
|
||||||
}
|
}
|
||||||
$operation['events'] = json_decode($operation['events'], true);
|
$operation['events'] = json_decode($operation['events'], true) ?? [];
|
||||||
|
|
||||||
|
|
||||||
return $operation;
|
return $operation;
|
||||||
|
|
Loading…
Reference in New Issue