mirror of
https://github.com/flarum/framework.git
synced 2024-12-05 00:43:39 +08:00
Make sure GetPermission event arguments array is empty if there is no model
This commit is contained in:
parent
910fdcfac7
commit
fb5dd99356
|
@ -78,7 +78,7 @@ class CoreServiceProvider extends AbstractServiceProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->app->make('events')->until(
|
return $this->app->make('events')->until(
|
||||||
new GetPermission($actor, $ability, [$model])
|
new GetPermission($actor, $ability, $model ? [$model] : [])
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user