File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 7
7
</p >
8
8
9
9
<p align =" center " >
10
- <a href="https://github.com/php-casbin/laravel-authz/actions">
10
+ <a href="https://github.com/php-casbin/laravel-authz/actions/workflows/build.yml ">
11
11
<img src="https://github.com/php-casbin/laravel-authz/workflows/build/badge.svg?branch=master" alt="Build Status">
12
12
</a>
13
13
<a href="https://coveralls.io/github/php-casbin/laravel-authz">
Original file line number Diff line number Diff line change @@ -91,12 +91,14 @@ public function createFileDriver()
91
91
*/
92
92
protected function createDriver ($ driver )
93
93
{
94
+ if (empty ($ driver )) {
95
+ throw new InvalidArgumentException ('Unsupported empty model loader type. ' );
96
+ }
97
+
94
98
if (isset ($ this ->customCreators [$ driver ])) {
95
99
return $ this ->callCustomCreator ($ driver );
96
100
}
97
-
98
101
$ method = 'create ' . Str::studly ($ driver ) . 'Driver ' ;
99
-
100
102
if (method_exists ($ this , $ method )) {
101
103
return $ this ->$ method ();
102
104
}
You can’t perform that action at this time.
0 commit comments