diff options
author | Vishal Pandey <vishpandey2014@gmail.com> | 2017-05-14 11:47:48 +0530 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2019-05-08 21:49:21 +0200 |
commit | dfcce400a44591fd610de400818b3d6af988104e (patch) | |
tree | f04b92f8afea055f0d232803571985d5f30cb46b /phpBB | |
parent | f1c2f7baae0da3277a2c71f47eed34589b62ba85 (diff) | |
download | forums-dfcce400a44591fd610de400818b3d6af988104e.tar forums-dfcce400a44591fd610de400818b3d6af988104e.tar.gz forums-dfcce400a44591fd610de400818b3d6af988104e.tar.bz2 forums-dfcce400a44591fd610de400818b3d6af988104e.tar.xz forums-dfcce400a44591fd610de400818b3d6af988104e.zip |
[ticket/11515] Inverted Logic
Inverted the logic to raise exception inside if.
PHPBB3-11515
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/phpbb/lock/flock.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/phpbb/lock/flock.php b/phpBB/phpbb/lock/flock.php index fa4cbe3690..6c41ceed26 100644 --- a/phpBB/phpbb/lock/flock.php +++ b/phpBB/phpbb/lock/flock.php @@ -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; |