Skip to content

Commit bf064ae

Browse files
committed
Fix init error
Typed static property Revolt\EventLoop::$fiber must not be accessed before initialization
1 parent ad191c2 commit bf064ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/EventLoop.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ public static function getDriver(): Driver
361361
public static function createSuspension(): Suspension
362362
{
363363
/** @psalm-suppress RedundantPropertyInitializationCheck */
364-
if (!self::$fiber || self::$fiber->isTerminated()) {
364+
if (!isset(self::$fiber) || self::$fiber->isTerminated()) {
365365
if (!\class_exists(\Fiber::class, false)) {
366366
throw new \Error("Fibers required to create loop suspensions");
367367
}

0 commit comments

Comments
 (0)