diff options
author | hubaishan <saeed@hubaishan.com> | 2018-09-16 06:38:58 +0300 |
---|---|---|
committer | hubaishan <saeed@hubaishan.com> | 2018-09-16 06:38:58 +0300 |
commit | c7631635fa738f4c7df45f6f671d2eb47f2f72a3 (patch) | |
tree | edae3e4b73ec48d8f51d78f8f46fb9b3714d5d9e /phpBB/phpbb/cache/driver | |
parent | b0d55a69c7de246371e5f9b3ce8ac4282eef36a6 (diff) | |
download | forums-c7631635fa738f4c7df45f6f671d2eb47f2f72a3.tar forums-c7631635fa738f4c7df45f6f671d2eb47f2f72a3.tar.gz forums-c7631635fa738f4c7df45f6f671d2eb47f2f72a3.tar.bz2 forums-c7631635fa738f4c7df45f6f671d2eb47f2f72a3.tar.xz forums-c7631635fa738f4c7df45f6f671d2eb47f2f72a3.zip |
[ticket/15791] php 7.2 count() bug in memory cache driver
function `_read` in classes inherted from `memory`
may returns `false` but `$vars` must be an array
PHPBB3-15791
Diffstat (limited to 'phpBB/phpbb/cache/driver')
-rw-r--r-- | phpBB/phpbb/cache/driver/memory.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/phpbb/cache/driver/memory.php b/phpBB/phpbb/cache/driver/memory.php index 052f40c243..eba9549877 100644 --- a/phpBB/phpbb/cache/driver/memory.php +++ b/phpBB/phpbb/cache/driver/memory.php @@ -51,10 +51,11 @@ abstract class memory extends \phpbb\cache\driver\base function load() { // grab the global cache - $this->vars = $this->_read('global'); + $data = $this->_read('global'); - if ($this->vars !== false) + if ($data !== false) { + $this->vars = $data; return true; } |