File tree Expand file tree Collapse file tree 1 file changed +17
-10
lines changed Expand file tree Collapse file tree 1 file changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -272,19 +272,26 @@ public function deleteNotificationsAction(Request $request): Response
272
272
return $ this ->redirectToRoute ('ibexa.notifications.render.all ' );
273
273
}
274
274
275
- $ result = $ this ->submitHandler ->handle ($ form , [$ this , 'processDeleteNotifications ' ]);
275
+ if ($ form ->isValid ()) {
276
+ $ result = $ this ->submitHandler ->handle (
277
+ $ form ,
278
+ function (NotificationSelectionData $ data ) {
279
+ return $ this ->processDeleteNotifications ($ data );
280
+ }
281
+ );
276
282
277
- if ($ result instanceof Response) {
278
- return $ result ;
283
+ if ($ result instanceof Response) {
284
+ return $ result ;
285
+ }
286
+ } else {
287
+ $ this ->notificationHandler ->error (
288
+ /** @Desc("An unexpected error occurred while deleting notifications.") */
289
+ 'error.unexpected_delete_notifications ' ,
290
+ [],
291
+ 'ibexa_notifications '
292
+ );
279
293
}
280
294
281
- $ this ->notificationHandler ->error (
282
- /** @Desc("An unexpected error occurred while deleting notifications.") */
283
- 'error.unexpected_delete_notifications ' ,
284
- [],
285
- 'ibexa_notifications '
286
- );
287
-
288
295
return $ this ->redirectToRoute ('ibexa.notifications.render.all ' );
289
296
}
290
297
You can’t perform that action at this time.
0 commit comments