Skip to content
Snippets Groups Projects
Unverified Commit c3061e69 authored by Julius Härtl's avatar Julius Härtl
Browse files

Make sure event names is always an array


Signed-off-by: default avatarJulius Härtl <jus@bitgrid.net>
parent da84b361
No related branches found
No related tags found
Loading
...@@ -127,7 +127,7 @@ class Application extends \OCP\AppFramework\App { ...@@ -127,7 +127,7 @@ class Application extends \OCP\AppFramework\App {
} }
} }
); );
}, $eventNames); }, $eventNames ?? []);
} }
} }
} }
......
...@@ -145,7 +145,7 @@ class Manager implements IManager { ...@@ -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 { ...@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment