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:
@@ -339,7 +339,7 @@ class manager
|
||||
}
|
||||
}
|
||||
|
||||
if (!sizeof($notify_users))
|
||||
if (!count($notify_users))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@@ -99,7 +99,7 @@ class pm extends \phpbb\notification\type\base
|
||||
'ignore_users' => array(),
|
||||
), $options);
|
||||
|
||||
if (!sizeof($pm['recipients']))
|
||||
if (!count($pm['recipients']))
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
@@ -202,9 +202,9 @@ class post extends \phpbb\notification\type\base
|
||||
'username' => $this->get_data('post_username'),
|
||||
)), $responders);
|
||||
|
||||
$responders_cnt = sizeof($responders);
|
||||
$responders_cnt = count($responders);
|
||||
$responders = $this->trim_user_ary($responders);
|
||||
$trimmed_responders_cnt = $responders_cnt - sizeof($responders);
|
||||
$trimmed_responders_cnt = $responders_cnt - count($responders);
|
||||
|
||||
foreach ($responders as $responder)
|
||||
{
|
||||
@@ -337,7 +337,7 @@ class post extends \phpbb\notification\type\base
|
||||
*/
|
||||
public function trim_user_ary($users)
|
||||
{
|
||||
if (sizeof($users) > 4)
|
||||
if (count($users) > 4)
|
||||
{
|
||||
array_splice($users, 3);
|
||||
}
|
||||
@@ -357,7 +357,7 @@ class post extends \phpbb\notification\type\base
|
||||
*/
|
||||
public function pre_create_insert_array($post, $notify_users)
|
||||
{
|
||||
if (!sizeof($notify_users) || !$this->inherit_read_status)
|
||||
if (!count($notify_users) || !$this->inherit_read_status)
|
||||
{
|
||||
return array();
|
||||
}
|
||||
@@ -426,7 +426,7 @@ class post extends \phpbb\notification\type\base
|
||||
// Do not add more than 25 responders,
|
||||
// we trim the username list to "a, b, c and x others" anyway
|
||||
// so there is no use to add all of them anyway.
|
||||
if (sizeof($responders) > 25)
|
||||
if (count($responders) > 25)
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
@@ -261,7 +261,7 @@ class topic extends \phpbb\notification\type\base
|
||||
*/
|
||||
public function pre_create_insert_array($post, $notify_users)
|
||||
{
|
||||
if (!sizeof($notify_users) || !$this->inherit_read_status)
|
||||
if (!count($notify_users) || !$this->inherit_read_status)
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
Reference in New Issue
Block a user