1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +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
committed by Marc Alexander
parent ff18802656
commit f8fbe37936
165 changed files with 983 additions and 983 deletions

View File

@@ -409,7 +409,7 @@ class compress_zip extends compress
function close()
{
// Write out central file directory and footer ... if it exists
if (sizeof($this->ctrl_dir))
if (count($this->ctrl_dir))
{
fwrite($this->fp, $this->file());
}
@@ -511,8 +511,8 @@ class compress_zip extends compress
$ctrldir = implode('', $this->ctrl_dir);
return $ctrldir . $this->eof_cdh .
pack('v', sizeof($this->ctrl_dir)) . // total # of entries "on this disk"
pack('v', sizeof($this->ctrl_dir)) . // total # of entries overall
pack('v', count($this->ctrl_dir)) . // total # of entries "on this disk"
pack('v', count($this->ctrl_dir)) . // total # of entries overall
pack('V', strlen($ctrldir)) . // size of central dir
pack('V', $this->datasec_len) . // offset to start of central dir
"\x00\x00"; // .zip file comment length