mirror of
https://github.com/flarum/core.git
synced 2025-08-04 15:37:51 +02:00
fix: only set actor on events that have it (#3914)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user