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 910fdcfac7
commit fb5dd99356

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] : [])
);
});