1
0
mirror of https://github.com/flarum/core.git synced 2025-05-05 23:15:22 +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( return $this->app->make('events')->until(
new GetPermission($actor, $ability, [$model]) new GetPermission($actor, $ability, $model ? [$model] : [])
); );
}); });