mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/14972] replace all occurrences of sizeof() with the count()
PHPBB3-14972
This commit is contained in:
6
phpBB/phpbb/cache/driver/base.php
vendored
6
phpBB/phpbb/cache/driver/base.php
vendored
@@ -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;
|
||||
}
|
||||
|
4
phpBB/phpbb/cache/driver/file.php
vendored
4
phpBB/phpbb/cache/driver/file.php
vendored
@@ -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();
|
||||
}
|
||||
|
2
phpBB/phpbb/cache/driver/memory.php
vendored
2
phpBB/phpbb/cache/driver/memory.php
vendored
@@ -188,7 +188,7 @@ abstract class memory extends \phpbb\cache\driver\base
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!sizeof($this->vars))
|
||||
if (!count($this->vars))
|
||||
{
|
||||
$this->load();
|
||||
}
|
||||
|
Reference in New Issue
Block a user