Skip to content

Commit

Permalink
[BUGFIX] Event restriction is not applied to Demand subclasses
Browse files Browse the repository at this point in the history
I haven't used the IsEvent restriction in combination with an extended
demand class yet, but as a developer extending eventnews I expect the
IsEvent restriction to also be effective on subclasses of the eventnews
Demand class.
  • Loading branch information
adamkoppede authored and georgringer committed Aug 3, 2023
1 parent 7c686a9 commit 642391c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Hooks/AbstractDemandedRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class AbstractDemandedRepository
*/
public function modify(array $params)
{
if (get_class($params['demand']) !== Demand::class) {
if (!($params['demand'] instanceof Demand)) {
return;
}

Expand Down

0 comments on commit 642391c

Please sign in to comment.