Skip to content

Commit 5696b06

Browse files
authored
Merge pull request #17 from spaitnet/master
Fix deprecation for PHP 8+
2 parents f8a99a9 + 47c80af commit 5696b06

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Database.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,9 @@ public function __construct($file = null, $mode = self::FILE_IO)
581581
shmop_write($shmId, $buf, $pointer);
582582
$pointer += self::SHM_CHUNK_SIZE;
583583
}
584-
shmop_close($shmId);
584+
if (PHP_MAJOR_VERSION < 8) {
585+
shmop_close($shmId);
586+
}
585587
fclose($fp);
586588

587589
// now open the memory segment for readonly access

0 commit comments

Comments
 (0)