1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-11 19:24:01 +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

@@ -64,7 +64,7 @@ class local extends \phpbb\avatar\driver\driver
$table_cols = isset($row['avatar_gallery_cols']) ? $row['avatar_gallery_cols'] : 4;
$row_count = $col_count = $avatar_pos = 0;
$avatar_count = sizeof($avatar_list[$category]);
$avatar_count = count($avatar_list[$category]);
reset($avatar_list[$category]);

View File

@@ -167,7 +167,7 @@ class upload extends \phpbb\avatar\driver\driver
$file->clean_filename('avatar', $prefix, $row['id']);
// If there was an error during upload, then abort operation
if (sizeof($file->error))
if (count($file->error))
{
$file->remove();
$error = $file->error;
@@ -221,7 +221,7 @@ class upload extends \phpbb\avatar\driver\driver
unset($filedata);
if (!sizeof($error))
if (!count($error))
{
// Move file and overwrite any existing image
$file->move_file($destination, true);
@@ -229,7 +229,7 @@ class upload extends \phpbb\avatar\driver\driver
// If there was an error during move, then clean up leftovers
$error = array_merge($error, $file->error);
if (sizeof($error))
if (count($error))
{
$file->remove();
return false;
@@ -291,7 +291,7 @@ class upload extends \phpbb\avatar\driver\driver
);
extract($this->dispatcher->trigger_event('core.avatar_driver_upload_delete_before', compact($vars)));
if (!sizeof($error) && $this->filesystem->exists($filename))
if (!count($error) && $this->filesystem->exists($filename))
{
try
{