diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2019-12-06 11:36:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-06 11:36:56 +0100 |
commit | 6caec491c134f99584c8877c1ebc13acdbfbb057 (patch) | |
tree | 2944f17f851450f1ac9309d080df8dbcc39b4daa | |
parent | da84b36186f05c5042e109328fa5095d26fd9a74 (diff) | |
parent | c3061e69294a8394ecd8fbbb1376e592ef4bc6d5 (diff) | |
download | nextcloud-server-6caec491c134f99584c8877c1ebc13acdbfbb057.tar.gz nextcloud-server-6caec491c134f99584c8877c1ebc13acdbfbb057.zip |
Merge pull request #18262 from nextcloud/bugfix/noid/workflow-eventnames-fallback
Make sure event names is always an array
-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; |