Skip to content

Commit 5df44f2

Browse files
committed
fixed error
1 parent b8dd11f commit 5df44f2

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/Traits/RegistrarMethods.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ trait RegistrarMethods
3131
public function registrarGet(): ?RegistrarInterface
3232
{
3333
$registrar = config('plugin.workbunny.webman-push-server.registrar.handler');
34-
return is_a($registrar, RegistrarInterface::class, true) ? new $registrar : null;
34+
return is_a($registrar, RegistrarInterface::class, true)
35+
// 兼容旧版配置
36+
? (is_string($registrar) ? new $registrar : $registrar)
37+
: null;
3538
}
3639

3740
/**

0 commit comments

Comments
 (0)