diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-12-06 10:32:37 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-12-06 10:32:55 +0100 |
commit | c3061e69294a8394ecd8fbbb1376e592ef4bc6d5 (patch) | |
tree | 2944f17f851450f1ac9309d080df8dbcc39b4daa /apps/workflowengine/lib | |
parent | da84b36186f05c5042e109328fa5095d26fd9a74 (diff) | |
download | nextcloud-server-c3061e69294a8394ecd8fbbb1376e592ef4bc6d5.tar.gz nextcloud-server-c3061e69294a8394ecd8fbbb1376e592ef4bc6d5.zip |
Make sure event names is always an array
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/workflowengine/lib')
-rw-r--r-- | apps/workflowengine/lib/AppInfo/Application.php | 2 | ||||
-rw-r--r-- | apps/workflowengine/lib/Manager.php | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/workflowengine/lib/AppInfo/Application.php b/apps/workflowengine/lib/AppInfo/Application.php index 933d0cb7544..2d04e2a1bf9 100644 --- a/apps/workflowengine/lib/AppInfo/Application.php +++ b/apps/workflowengine/lib/AppInfo/Application.php @@ -127,7 +127,7 @@ class Application extends \OCP\AppFramework\App { } } ); - }, $eventNames); + }, $eventNames ?? []); } } } diff --git a/apps/workflowengine/lib/Manager.php b/apps/workflowengine/lib/Manager.php index f97d77f5983..0dbe7dbfc13 100644 --- a/apps/workflowengine/lib/Manager.php +++ b/apps/workflowengine/lib/Manager.php @@ -145,7 +145,7 @@ class Manager implements IManager { $operations[$operation] = $operations[$row['class']] ?? []; $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(); @@ -589,7 +589,7 @@ class Manager implements IManager { $operation['checks'][] = $check; } - $operation['events'] = json_decode($operation['events'], true); + $operation['events'] = json_decode($operation['events'], true) ?? []; return $operation; |