[ticket/11515] Inverted Logic

Inverted the logic to raise exception inside if.

PHPBB3-11515
This commit is contained in:
Vishal Pandey 2017-05-14 11:47:48 +05:30 committed by Marc Alexander
parent f1c2f7baae
commit dfcce400a4
No known key found for this signature in database
GPG key ID: 50E0D2423696F995

View file

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