1
0
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:
rxu
2017-06-28 00:58:03 +07:00
parent 67a65e3788
commit 797234e416
165 changed files with 986 additions and 986 deletions

View File

@@ -59,7 +59,7 @@ class acp_database
$format = $request->variable('method', '');
$where = $request->variable('where', '');
if (!sizeof($table))
if (!count($table))
{
trigger_error($user->lang['TABLE_SELECT_ERROR'] . adm_back_link($this->u_action), E_USER_WARNING);
}
@@ -495,7 +495,7 @@ function sanitize_data_mssql($text)
{
$val[] = "'" . $value . "'";
}
if (sizeof($matches[0]))
if (count($matches[0]))
{
$val[] = 'char(' . ord(array_shift($matches[0])) . ')';
}
@@ -519,7 +519,7 @@ function sanitize_data_oracle($text)
{
$val[] = "'" . $value . "'";
}
if (sizeof($matches[0]))
if (count($matches[0]))
{
$val[] = 'chr(' . ord(array_shift($matches[0])) . ')';
}
@@ -541,7 +541,7 @@ function sanitize_data_generic($text)
{
$val[] = "'" . $value . "'";
}
if (sizeof($matches[0]))
if (count($matches[0]))
{
$val[] = "'" . array_shift($matches[0]) . "'";
}
@@ -583,7 +583,7 @@ function fgetd_seekless(&$fp, $delim, $read, $seek, $eof, $buffer = 8192)
static $array = array();
static $record = '';
if (!sizeof($array))
if (!count($array))
{
while (!$eof($fp))
{
@@ -605,7 +605,7 @@ function fgetd_seekless(&$fp, $delim, $read, $seek, $eof, $buffer = 8192)
}
}
if (sizeof($array))
if (count($array))
{
return array_shift($array);
}