[ticket/14972] replace all occurrences of sizeof() with the count()

PHPBB3-14972
This commit is contained in:
Rubén Calvo 2017-09-17 17:00:39 +02:00
parent 024cf709c4
commit e1e2c8ae3f
2 changed files with 4 additions and 4 deletions

View file

@ -111,7 +111,7 @@ class filespec_storage
*/ */
public function set_upload_ary($upload_ary) public function set_upload_ary($upload_ary)
{ {
if (!isset($upload_ary) || !sizeof($upload_ary)) if (!isset($upload_ary) || !count($upload_ary))
{ {
return $this; return $this;
} }
@ -389,7 +389,7 @@ class filespec_storage
*/ */
public function move_file($storage, $overwrite = false, $skip_image_check = false) public function move_file($storage, $overwrite = false, $skip_image_check = false)
{ {
if (sizeof($this->error)) if (count($this->error))
{ {
return false; return false;
} }
@ -460,7 +460,7 @@ class filespec_storage
// Remove temporary filename // Remove temporary filename
@unlink($this->filename); @unlink($this->filename);
if (sizeof($this->error)) if (count($this->error))
{ {
return false; return false;
} }

View file

@ -109,7 +109,7 @@ class form_storage extends base
// PHP Upload file size check // PHP Upload file size check
$file = $this->check_upload_size($file); $file = $this->check_upload_size($file);
if (sizeof($file->error)) if (count($file->error))
{ {
return $file; return $file;
} }