From a44bfcfd529439c2ac05d0f300fd241b54a24af3 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 25 Feb 2013 21:28:51 +0400 Subject: [PATCH] make_lockfile: check if file was created successfully --- include/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/functions.php b/include/functions.php index 2b7b7c58..72d86e0a 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"); } -- 2.39.5