Unflagging event is getting wrong event

Created on 19 October 2023, about 1 year ago
Updated 5 December 2023, 12 months ago

Problem/Motivation

While unflagging a node following error is thrown:

TypeError: Drupal\flag_lists\EventSubscriber\FlagForListSubscriber::flagListsEntityUnflagged(): Argument #1 ($flag_events) must be of type Symfony\Component\EventDispatcher\Event, Drupal\flag\Event\UnflaggingEvent given in Drupal\flag_lists\EventSubscriber\FlagForListSubscriber->flagListsEntityUnflagged() (line 57 of /app/public/modules/contrib/flag_lists/src/EventSubscriber/FlagForListSubscriber.php).

Steps to reproduce

Environment: Drupal 10

  • Flag a node
  • Try to unflag node

Proposed resolution

Change expected argument types to FlaggingEvent and UnflaggingEvent in corresponding methods.

🐛 Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

🇫🇮Finland jviitamaki

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024