Skip to content

Commit 8d934b0

Browse files
authored
class_exists(): Passing null to parameter #1 ($class) of type string is deprecated in php 8.1 (#327)
1 parent 5e14d42 commit 8d934b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Omniphx/Forrest/Providers/Laravel/ForrestServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ protected function getStorage($storageType)
4242
case 'object':
4343
return new ObjectStorage();
4444
default:
45-
if(class_exists($storageType) && new $storageType() instanceof StorageInterface) {
45+
if($storageType !== null && class_exists($storageType) && new $storageType() instanceof StorageInterface) {
4646
return new $storageType();
4747
} else {
4848
return new LaravelSession(app('config'), app('request')->session());

0 commit comments

Comments
 (0)