File tree Expand file tree Collapse file tree
apps/workflowengine/lib/Entity Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -136,9 +136,8 @@ protected function getNode(): Node {
136136 if (!$ this ->event instanceof MapperEvent || $ this ->event ->getObjectType () !== 'files ' ) {
137137 throw new NotFoundException ();
138138 }
139- $ nodes = $ this ->root ->getById ((int )$ this ->event ->getObjectId ());
140- if (is_array ($ nodes ) && isset ($ nodes [0 ])) {
141- $ this ->node = $ nodes [0 ];
139+ $ this ->node = $ this ->root ->getFirstNodeById ((int )$ this ->event ->getObjectId ());
140+ if ($ this ->node !== null ) {
142141 return $ this ->node ;
143142 }
144143 break ;
@@ -228,11 +227,11 @@ public function importContextIDs(array $contextIDs): void {
228227 $ this ->eventName = $ contextIDs ['eventName ' ];
229228 if ($ contextIDs ['nodeOwnerId ' ] !== null ) {
230229 $ userFolder = $ this ->root ->getUserFolder ($ contextIDs ['nodeOwnerId ' ]);
231- $ nodes = $ userFolder ->getById ($ contextIDs ['nodeId ' ]);
230+ $ node = $ userFolder ->getFirstNodeById ($ contextIDs ['nodeId ' ]);
232231 } else {
233- $ nodes = $ this ->root ->getById ($ contextIDs ['nodeId ' ]);
232+ $ node = $ this ->root ->getFirstNodeById ($ contextIDs ['nodeId ' ]);
234233 }
235- $ this ->node = $ nodes [ 0 ] ?? null ;
234+ $ this ->node = $ node ;
236235 if ($ contextIDs ['actingUserId ' ]) {
237236 $ this ->actingUser = $ this ->userManager ->get ($ contextIDs ['actingUserId ' ]);
238237 }
You can’t perform that action at this time.
0 commit comments