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:
@@ -267,7 +267,7 @@ class mssqlnative extends \phpbb\db\driver\mssql_base
|
||||
unset($row['line2'], $row['line3']);
|
||||
}
|
||||
}
|
||||
return (sizeof($row)) ? $row : false;
|
||||
return (count($row)) ? $row : false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -136,7 +136,7 @@ class oracle extends \phpbb\db\driver\driver
|
||||
*/
|
||||
function _rewrite_col_compare($args)
|
||||
{
|
||||
if (sizeof($args) == 4)
|
||||
if (count($args) == 4)
|
||||
{
|
||||
if ($args[2] == '=')
|
||||
{
|
||||
@@ -290,7 +290,7 @@ class oracle extends \phpbb\db\driver\driver
|
||||
and/or need the db restore script, uncomment this.
|
||||
|
||||
|
||||
if (sizeof($cols) !== sizeof($vals))
|
||||
if (count($cols) !== count($vals))
|
||||
{
|
||||
// Try to replace some common data we know is from our restore script or from other sources
|
||||
$regs[3] = str_replace("'||chr(47)||'", '/', $regs[3]);
|
||||
@@ -332,7 +332,7 @@ class oracle extends \phpbb\db\driver\driver
|
||||
if ($string)
|
||||
{
|
||||
// New value if cols != value
|
||||
$vals[(sizeof($cols) !== sizeof($vals)) ? $i : $i - 1] .= $string;
|
||||
$vals[(count($cols) !== count($vals)) ? $i : $i - 1] .= $string;
|
||||
}
|
||||
|
||||
$vals = array(0 => $vals);
|
||||
|
Reference in New Issue
Block a user