1
0
mirror of https://github.com/flarum/core.git synced 2025-05-05 15:07:17 +02:00

Make sure GetPermission event arguments array is empty if there is no model

This commit is contained in:
Toby Zerner 2016-01-02 15:23:48 +10:30
parent 6de7038f83
commit 8d671f4de4

View File

@ -78,7 +78,7 @@ class CoreServiceProvider extends AbstractServiceProvider
}
return $this->app->make('events')->until(
new GetPermission($actor, $ability, [$model])
new GetPermission($actor, $ability, $model ? [$model] : [])
);
});