mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[ticket/14972] replace all occurrences of sizeof() with the count()
PHPBB3-14972
This commit is contained in:
@@ -391,7 +391,7 @@ class log implements \phpbb\log\log_interface
|
||||
{
|
||||
$sql_where .= ' AND ';
|
||||
|
||||
if (is_array($field_value) && sizeof($field_value) == 2 && !is_array($field_value[1]))
|
||||
if (is_array($field_value) && count($field_value) == 2 && !is_array($field_value[1]))
|
||||
{
|
||||
$sql_where .= $field . ' ' . $field_value[0] . ' ' . $field_value[1];
|
||||
}
|
||||
@@ -689,9 +689,9 @@ class log implements \phpbb\log\log_interface
|
||||
}
|
||||
}
|
||||
|
||||
if (($num_args - sizeof($log_data_ary)) > 0)
|
||||
if (($num_args - count($log_data_ary)) > 0)
|
||||
{
|
||||
$log_data_ary = array_merge($log_data_ary, array_fill(0, $num_args - sizeof($log_data_ary), ''));
|
||||
$log_data_ary = array_merge($log_data_ary, array_fill(0, $num_args - count($log_data_ary), ''));
|
||||
}
|
||||
|
||||
$lang_arguments = array_merge(array($log[$i]['action']), $log_data_ary);
|
||||
@@ -740,7 +740,7 @@ class log implements \phpbb\log\log_interface
|
||||
$vars = array('log', 'topic_id_list', 'reportee_id_list');
|
||||
extract($this->dispatcher->trigger_event('core.get_logs_get_additional_data', compact($vars)));
|
||||
|
||||
if (sizeof($topic_id_list))
|
||||
if (count($topic_id_list))
|
||||
{
|
||||
$topic_auth = $this->get_topic_auth($topic_id_list);
|
||||
|
||||
@@ -752,7 +752,7 @@ class log implements \phpbb\log\log_interface
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof($reportee_id_list))
|
||||
if (count($reportee_id_list))
|
||||
{
|
||||
$reportee_data_list = $this->get_reportee_data($reportee_id_list);
|
||||
|
||||
@@ -838,7 +838,7 @@ class log implements \phpbb\log\log_interface
|
||||
$keywords_pattern = array();
|
||||
|
||||
// Build pattern and keywords...
|
||||
for ($i = 0, $num_keywords = sizeof($keywords); $i < $num_keywords; $i++)
|
||||
for ($i = 0, $num_keywords = count($keywords); $i < $num_keywords; $i++)
|
||||
{
|
||||
$keywords_pattern[] = preg_quote($keywords[$i], '#');
|
||||
$keywords[$i] = $this->db->sql_like_expression($this->db->get_any_char() . $keywords[$i] . $this->db->get_any_char());
|
||||
|
Reference in New Issue
Block a user