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:
@@ -68,7 +68,7 @@ class acp_email
|
||||
$error[] = $user->lang['NO_EMAIL_MESSAGE'];
|
||||
}
|
||||
|
||||
if (!sizeof($error))
|
||||
if (!count($error))
|
||||
{
|
||||
if (!empty($usernames))
|
||||
{
|
||||
@@ -168,7 +168,7 @@ class acp_email
|
||||
{
|
||||
$i = 0;
|
||||
|
||||
if (sizeof($email_list))
|
||||
if (count($email_list))
|
||||
{
|
||||
$j++;
|
||||
}
|
||||
@@ -235,16 +235,16 @@ class acp_email
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_email_send_before', compact($vars)));
|
||||
|
||||
for ($i = 0, $size = sizeof($email_list); $i < $size; $i++)
|
||||
for ($i = 0, $size = count($email_list); $i < $size; $i++)
|
||||
{
|
||||
$used_lang = $email_list[$i][0]['lang'];
|
||||
$used_method = $email_list[$i][0]['method'];
|
||||
|
||||
for ($j = 0, $list_size = sizeof($email_list[$i]); $j < $list_size; $j++)
|
||||
for ($j = 0, $list_size = count($email_list[$i]); $j < $list_size; $j++)
|
||||
{
|
||||
$email_row = $email_list[$i][$j];
|
||||
|
||||
$messenger->{((sizeof($email_list[$i]) == 1) ? 'to' : 'bcc')}($email_row['email'], $email_row['name']);
|
||||
$messenger->{((count($email_list[$i]) == 1) ? 'to' : 'bcc')}($email_row['email'], $email_row['name']);
|
||||
$messenger->im($email_row['jabber'], $email_row['name']);
|
||||
}
|
||||
|
||||
@@ -322,8 +322,8 @@ class acp_email
|
||||
$s_priority_options .= '<option value="' . MAIL_HIGH_PRIORITY . '">' . $user->lang['MAIL_HIGH_PRIORITY'] . '</option>';
|
||||
|
||||
$template_data = array(
|
||||
'S_WARNING' => (sizeof($error)) ? true : false,
|
||||
'WARNING_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
|
||||
'S_WARNING' => (count($error)) ? true : false,
|
||||
'WARNING_MSG' => (count($error)) ? implode('<br />', $error) : '',
|
||||
'U_ACTION' => $this->u_action,
|
||||
'S_GROUP_OPTIONS' => $select_list,
|
||||
'USERNAMES' => implode("\n", $usernames),
|
||||
|
Reference in New Issue
Block a user