From c7631635fa738f4c7df45f6f671d2eb47f2f72a3 Mon Sep 17 00:00:00 2001 From: hubaishan Date: Sun, 16 Sep 2018 06:38:58 +0300 Subject: [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 --- phpBB/phpbb/cache/driver/memory.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'phpBB/phpbb/cache') 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; } -- cgit v1.2.1