diff options
author | rxu <rxu@mail.ru> | 2017-06-28 00:58:03 +0700 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2018-01-01 13:56:04 +0100 |
commit | f8fbe3793680af1dae2db2829cfc84068831c52f (patch) | |
tree | 54c7108b28fb58688a8695a0b592c163314a09f9 /phpBB/phpbb/cache/driver | |
parent | ff18802656e72981f6ecb613d756bc19f2462689 (diff) | |
download | forums-f8fbe3793680af1dae2db2829cfc84068831c52f.tar forums-f8fbe3793680af1dae2db2829cfc84068831c52f.tar.gz forums-f8fbe3793680af1dae2db2829cfc84068831c52f.tar.bz2 forums-f8fbe3793680af1dae2db2829cfc84068831c52f.tar.xz forums-f8fbe3793680af1dae2db2829cfc84068831c52f.zip |
[ticket/14972] replace all occurrences of sizeof() with the count()
PHPBB3-14972
Diffstat (limited to 'phpBB/phpbb/cache/driver')
-rw-r--r-- | phpBB/phpbb/cache/driver/base.php | 6 | ||||
-rw-r--r-- | phpBB/phpbb/cache/driver/file.php | 4 | ||||
-rw-r--r-- | phpBB/phpbb/cache/driver/memory.php | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/phpBB/phpbb/cache/driver/base.php b/phpBB/phpbb/cache/driver/base.php index f4b3dc278d..3eca521148 100644 --- a/phpBB/phpbb/cache/driver/base.php +++ b/phpBB/phpbb/cache/driver/base.php @@ -123,7 +123,7 @@ abstract class base implements \phpbb\cache\driver\driver_interface */ function sql_fetchrow($query_id) { - if ($this->sql_row_pointer[$query_id] < sizeof($this->sql_rowset[$query_id])) + if ($this->sql_row_pointer[$query_id] < count($this->sql_rowset[$query_id])) { return $this->sql_rowset[$query_id][$this->sql_row_pointer[$query_id]++]; } @@ -136,7 +136,7 @@ abstract class base implements \phpbb\cache\driver\driver_interface */ function sql_fetchfield($query_id, $field) { - if ($this->sql_row_pointer[$query_id] < sizeof($this->sql_rowset[$query_id])) + if ($this->sql_row_pointer[$query_id] < count($this->sql_rowset[$query_id])) { return (isset($this->sql_rowset[$query_id][$this->sql_row_pointer[$query_id]][$field])) ? $this->sql_rowset[$query_id][$this->sql_row_pointer[$query_id]++][$field] : false; } @@ -149,7 +149,7 @@ abstract class base implements \phpbb\cache\driver\driver_interface */ function sql_rowseek($rownum, $query_id) { - if ($rownum >= sizeof($this->sql_rowset[$query_id])) + if ($rownum >= count($this->sql_rowset[$query_id])) { return false; } diff --git a/phpBB/phpbb/cache/driver/file.php b/phpBB/phpbb/cache/driver/file.php index e9d2ba8e04..de6f444251 100644 --- a/phpBB/phpbb/cache/driver/file.php +++ b/phpBB/phpbb/cache/driver/file.php @@ -135,7 +135,7 @@ class file extends \phpbb\cache\driver\base if (file_exists($this->cache_dir . 'data_global.' . $phpEx)) { - if (!sizeof($this->vars)) + if (!count($this->vars)) { $this->load(); } @@ -290,7 +290,7 @@ class file extends \phpbb\cache\driver\base } else { - if (!sizeof($this->vars)) + if (!count($this->vars)) { $this->load(); } diff --git a/phpBB/phpbb/cache/driver/memory.php b/phpBB/phpbb/cache/driver/memory.php index cc03804705..052f40c243 100644 --- a/phpBB/phpbb/cache/driver/memory.php +++ b/phpBB/phpbb/cache/driver/memory.php @@ -188,7 +188,7 @@ abstract class memory extends \phpbb\cache\driver\base } else { - if (!sizeof($this->vars)) + if (!count($this->vars)) { $this->load(); } |