summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--functions.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/functions.php b/functions.php
index 8eb6d79a6..1563c95ee 100644
--- a/functions.php
+++ b/functions.php
@@ -2236,7 +2236,9 @@
$fp = fopen(LOCK_DIRECTORY . "/$filename", "w");
if (flock($fp, LOCK_EX | LOCK_NB)) {
- fwrite($fp, posix_getpid() . "\n");
+ if (function_exists('posix_getpid')) {
+ fwrite($fp, posix_getpid() . "\n");
+ }
return $fp;
} else {
return false;