diff --git a/include/functions.php b/include/functions.php index 2b7b7c586..72d86e0a7 100644 --- a/include/functions.php +++ b/include/functions.php @@ -929,7 +929,7 @@ function make_lockfile($filename) { $fp = fopen(LOCK_DIRECTORY . "/$filename", "w"); - if (flock($fp, LOCK_EX | LOCK_NB)) { + if ($fp && flock($fp, LOCK_EX | LOCK_NB)) { if (function_exists('posix_getpid')) { fwrite($fp, posix_getpid() . "\n"); }