Skip to content

Commit d57cba0

Browse files
authored
Merge pull request #6 from srjlewis/master
Stop a crash when and call to prepareToFork()
2 parents 2c93fa3 + 7252420 commit d57cba0

File tree

1 file changed

+4
-0
lines changed
  • lib/Phpfastcache/Extensions/Drivers/Couchbasev4

1 file changed

+4
-0
lines changed

lib/Phpfastcache/Extensions/Drivers/Couchbasev4/Driver.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ protected function connect(?int $appendPPID = null): bool
148148
*/
149149
public static function prepareToFork(): void
150150
{
151+
if (!isset(static::$posixLoaded) && !isset(static::$extVersion)) {
152+
return;
153+
}
154+
151155
if (!static::$posixLoaded) {
152156
throw new PhpfastcacheDriverCheckException('POSIX extension is required to prepare for forking');
153157
}

0 commit comments

Comments
 (0)