From e263405a81b6d4fdca839cae0856e246fbcb58be Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Fri, 28 Feb 2020 07:54:48 +0100 Subject: [PATCH] [ticket/16325] Ensure lock file is opened for updating PHPBB3-16325 --- phpBB/phpbb/lock/flock.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/phpbb/lock/flock.php b/phpBB/phpbb/lock/flock.php index af051afb56..fc35c527bf 100644 --- a/phpBB/phpbb/lock/flock.php +++ b/phpBB/phpbb/lock/flock.php @@ -73,7 +73,7 @@ class flock // one file for writing simultaneously if (file_exists($this->path . '.lock')) { - $mode = 'rb'; + $mode = 'rb+'; } else { @@ -89,7 +89,7 @@ class flock // Two processes may attempt to create lock file at the same time. // Have the losing process try opening the lock file again for reading // on the assumption that the winning process created it - $mode = 'rb'; + $mode = 'rb+'; $this->lock_fp = @fopen($this->path . '.lock', $mode); } else