1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00

[ticket/14972] replace all occurrences of sizeof() with the count()

PHPBB3-14972
This commit is contained in:
rxu
2017-06-28 00:58:03 +07:00
committed by Marc Alexander
parent ff18802656
commit f8fbe37936
165 changed files with 983 additions and 983 deletions

View File

@@ -139,7 +139,7 @@ abstract class form
$this->errors[] = 'FORM_INVALID';
}
if (!sizeof($this->errors))
if (!count($this->errors))
{
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_emailtime = ' . time() . '
@@ -169,7 +169,7 @@ abstract class form
add_form_key('memberlist_email');
$template->assign_vars(array(
'ERROR_MESSAGE' => (sizeof($this->errors)) ? implode('<br />', $this->errors) : '',
'ERROR_MESSAGE' => (count($this->errors)) ? implode('<br />', $this->errors) : '',
));
}
}

View File

@@ -209,7 +209,7 @@ class message
*/
public function cc_sender()
{
if (!sizeof($this->recipients))
if (!count($this->recipients))
{
trigger_error('No email recipients specified');
}
@@ -238,7 +238,7 @@ class message
*/
public function send(\messenger $messenger, $contact)
{
if (!sizeof($this->recipients))
if (!count($this->recipients))
{
return;
}
@@ -271,7 +271,7 @@ class message
'MESSAGE' => htmlspecialchars_decode($this->body))
);
if (sizeof($this->template_vars))
if (count($this->template_vars))
{
$messenger->assign_vars($this->template_vars);
}