Skip to content

Commit 0ab2031

Browse files
authored
Fixed bug that $server must not be accessed before initialization. (#4568)
1 parent ce74816 commit 0ab2031

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Server.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class Server implements MiddlewareInitializerInterface, OnHandShakeInterface, On
6161
/**
6262
* @var null|\Swoole\Coroutine\Http\Server|WebSocketServer
6363
*/
64-
protected mixed $server;
64+
protected mixed $server = null;
6565

6666
public function __construct(protected ContainerInterface $container, protected HttpDispatcher $dispatcher, protected ExceptionHandlerDispatcher $exceptionHandlerDispatcher, protected ResponseEmitter $responseEmitter, protected StdoutLoggerInterface $logger)
6767
{

0 commit comments

Comments
 (0)