Skip to content

Commit

Permalink
Gracefully exit prepareToFork if driver has not been used.
Browse files Browse the repository at this point in the history
  • Loading branch information
srjlewis committed Jun 22, 2024
1 parent bd11a22 commit d25bbe7
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 d25bbe7

Please sign in to comment.