mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
[ticket/14972] replace all occurrences of sizeof() with the count()
PHPBB3-14972
This commit is contained in:
@@ -169,7 +169,7 @@ abstract class captcha_abstract
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
|
||||
if (sizeof($sql_in))
|
||||
if (count($sql_in))
|
||||
{
|
||||
$sql = 'DELETE FROM ' . CONFIRM_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('session_id', $sql_in);
|
||||
|
@@ -84,7 +84,7 @@ class qa
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// fallback to the board default lang
|
||||
if (!sizeof($this->question_ids))
|
||||
if (!count($this->question_ids))
|
||||
{
|
||||
$this->question_lang = $config['default_lang'];
|
||||
|
||||
@@ -101,7 +101,7 @@ class qa
|
||||
}
|
||||
|
||||
// final fallback to any language
|
||||
if (!sizeof($this->question_ids))
|
||||
if (!count($this->question_ids))
|
||||
{
|
||||
$this->question_lang = '';
|
||||
|
||||
@@ -311,7 +311,7 @@ class qa
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
|
||||
if (sizeof($sql_in))
|
||||
if (count($sql_in))
|
||||
{
|
||||
$sql = 'DELETE FROM ' . $this->table_qa_confirm . '
|
||||
WHERE ' . $db->sql_in_set('confirm_id', $sql_in);
|
||||
@@ -395,7 +395,7 @@ class qa
|
||||
|
||||
$error = '';
|
||||
|
||||
if (!sizeof($this->question_ids))
|
||||
if (!count($this->question_ids))
|
||||
{
|
||||
/** @var \phpbb\log\log_interface $phpbb_log */
|
||||
$phpbb_log->add('critical', $user->data['user_id'], $user->ip, 'LOG_ERROR_CAPTCHA', time(), array($user->lang('CONFIRM_QUESTION_MISSING')));
|
||||
@@ -439,7 +439,7 @@ class qa
|
||||
{
|
||||
global $db, $user;
|
||||
|
||||
if (!sizeof($this->question_ids))
|
||||
if (!count($this->question_ids))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -465,7 +465,7 @@ class qa
|
||||
{
|
||||
global $db, $user;
|
||||
|
||||
if (!sizeof($this->question_ids))
|
||||
if (!count($this->question_ids))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -536,7 +536,7 @@ class qa
|
||||
{
|
||||
global $db, $user;
|
||||
|
||||
if (!strlen($this->confirm_id) || !sizeof($this->question_ids))
|
||||
if (!strlen($this->confirm_id) || !count($this->question_ids))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -979,7 +979,7 @@ class qa
|
||||
|
||||
if (!isset($langs[$question_data['lang_iso']]) ||
|
||||
!strlen($question_data['question_text']) ||
|
||||
!sizeof($question_data['answers']) ||
|
||||
!count($question_data['answers']) ||
|
||||
!is_array($question_data['answers']))
|
||||
{
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user