From e1e2c8ae3ffdd53e23132b5b3180cc1b22816fc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Calvo?= Date: Sun, 17 Sep 2017 17:00:39 +0200 Subject: [PATCH] [ticket/14972] replace all occurrences of sizeof() with the count() PHPBB3-14972 --- phpBB/phpbb/files/filespec_storage.php | 6 +++--- phpBB/phpbb/files/types/form_storage.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/phpBB/phpbb/files/filespec_storage.php b/phpBB/phpbb/files/filespec_storage.php index c39c47dc38..b370b66a4e 100644 --- a/phpBB/phpbb/files/filespec_storage.php +++ b/phpBB/phpbb/files/filespec_storage.php @@ -111,7 +111,7 @@ class filespec_storage */ public function set_upload_ary($upload_ary) { - if (!isset($upload_ary) || !sizeof($upload_ary)) + if (!isset($upload_ary) || !count($upload_ary)) { return $this; } @@ -389,7 +389,7 @@ class filespec_storage */ public function move_file($storage, $overwrite = false, $skip_image_check = false) { - if (sizeof($this->error)) + if (count($this->error)) { return false; } @@ -460,7 +460,7 @@ class filespec_storage // Remove temporary filename @unlink($this->filename); - if (sizeof($this->error)) + if (count($this->error)) { return false; } diff --git a/phpBB/phpbb/files/types/form_storage.php b/phpBB/phpbb/files/types/form_storage.php index 29bef283bd..3024dc83e7 100644 --- a/phpBB/phpbb/files/types/form_storage.php +++ b/phpBB/phpbb/files/types/form_storage.php @@ -109,7 +109,7 @@ class form_storage extends base // PHP Upload file size check $file = $this->check_upload_size($file); - if (sizeof($file->error)) + if (count($file->error)) { return $file; }