1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-12 19:54:12 +02:00

[ticket/11515] Extra check after acquiring locks.

Add additional check to flock.php and db.php to ensure lock aquiring.

PHPBB3-11515
This commit is contained in:
Vishal Pandey
2017-03-14 00:57:28 +05:30
committed by Marc Alexander
parent 4282cf459e
commit 26acd8a5e4
3 changed files with 37 additions and 2 deletions

View File

@@ -101,7 +101,12 @@ class flock
if ($this->lock_fp)
{
@flock($this->lock_fp, LOCK_EX);
if (@flock($this->lock_fp, LOCK_EX))
{
return (bool) $this->lock_fp;
} else {
throw new \phpbb\exception\http_exception(500, 'Failure while aqcuiring locks.');
}
}
return (bool) $this->lock_fp;