mirror of
https://github.com/flarum/framework.git
synced 2025-04-13 16:30:22 +08:00
fix: only set actor on events that have it (#3914)
This commit is contained in:
parent
bbdf3b5aba
commit
a9756cb5eb
@ -25,7 +25,9 @@ trait DispatchEventsTrait
|
||||
}
|
||||
|
||||
foreach ($entity->releaseEvents() as $event) {
|
||||
$event->actor = $actor;
|
||||
if (property_exists($event, 'actor') && ! $event->actor) {
|
||||
$event->actor = $actor;
|
||||
}
|
||||
|
||||
$this->events->dispatch($event);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user