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/log | |
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/log')
-rw-r--r-- | phpBB/phpbb/log/log.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/phpBB/phpbb/log/log.php b/phpBB/phpbb/log/log.php index dcc4cdde51..5333fe2bdf 100644 --- a/phpBB/phpbb/log/log.php +++ b/phpBB/phpbb/log/log.php @@ -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()); |