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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user