Skip to content

Commit 1e31ca5

Browse files
committed
Merge branch 'feature-more-built-in-0.1'
2 parents 3c20709 + 0b14d17 commit 1e31ca5

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</p>
88

99
<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">
1111
<img src="https://github.com/php-casbin/laravel-authz/workflows/build/badge.svg?branch=master" alt="Build Status">
1212
</a>
1313
<a href="https://coveralls.io/github/php-casbin/laravel-authz">

src/Loaders/LoaderManager.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,14 @@ public function createFileDriver()
9191
*/
9292
protected function createDriver($driver)
9393
{
94+
if(empty($driver)) {
95+
throw new InvalidArgumentException('Unsupported empty model loader type.');
96+
}
97+
9498
if (isset($this->customCreators[$driver])) {
9599
return $this->callCustomCreator($driver);
96100
}
97-
98101
$method = 'create' . Str::studly($driver) . 'Driver';
99-
100102
if (method_exists($this, $method)) {
101103
return $this->$method();
102104
}

0 commit comments

Comments
 (0)