Skip to content

Commit

Permalink
Merge pull request #6 from srjlewis/master
Browse files Browse the repository at this point in the history
Stop a crash when and call to prepareToFork()
  • Loading branch information
Geolim4 authored Jul 28, 2024
2 parents 2c93fa3 + 7252420 commit d57cba0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Phpfastcache/Extensions/Drivers/Couchbasev4/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ protected function connect(?int $appendPPID = null): bool
*/
public static function prepareToFork(): void
{
if (!isset(static::$posixLoaded) && !isset(static::$extVersion)) {
return;
}

if (!static::$posixLoaded) {
throw new PhpfastcacheDriverCheckException('POSIX extension is required to prepare for forking');
}
Expand Down

0 comments on commit d57cba0

Please sign in to comment.