diff options
author | rxu <rxu@mail.ru> | 2017-06-28 00:58:03 +0700 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2018-01-01 13:56:04 +0100 |
commit | f8fbe3793680af1dae2db2829cfc84068831c52f (patch) | |
tree | 54c7108b28fb58688a8695a0b592c163314a09f9 /phpBB/phpbb/install/module | |
parent | ff18802656e72981f6ecb613d756bc19f2462689 (diff) | |
download | forums-f8fbe3793680af1dae2db2829cfc84068831c52f.tar forums-f8fbe3793680af1dae2db2829cfc84068831c52f.tar.gz forums-f8fbe3793680af1dae2db2829cfc84068831c52f.tar.bz2 forums-f8fbe3793680af1dae2db2829cfc84068831c52f.tar.xz forums-f8fbe3793680af1dae2db2829cfc84068831c52f.zip |
[ticket/14972] replace all occurrences of sizeof() with the count()
PHPBB3-14972
Diffstat (limited to 'phpBB/phpbb/install/module')
8 files changed, 8 insertions, 8 deletions
diff --git a/phpBB/phpbb/install/module/install_data/task/add_bots.php b/phpBB/phpbb/install/module/install_data/task/add_bots.php index 1f1cecceb2..07f8e025cf 100644 --- a/phpBB/phpbb/install/module/install_data/task/add_bots.php +++ b/phpBB/phpbb/install/module/install_data/task/add_bots.php @@ -239,7 +239,7 @@ class add_bots extends \phpbb\install\task_base $this->install_config->set('add_bot_index', $i); - if ($i < sizeof($this->bot_list)) + if ($i < count($this->bot_list)) { throw new resource_limit_reached_exception(); } diff --git a/phpBB/phpbb/install/module/install_data/task/add_modules.php b/phpBB/phpbb/install/module/install_data/task/add_modules.php index d21a5be823..b64f4c31db 100644 --- a/phpBB/phpbb/install/module/install_data/task/add_modules.php +++ b/phpBB/phpbb/install/module/install_data/task/add_modules.php @@ -169,7 +169,7 @@ class add_modules extends \phpbb\install\task_base $this->db->sql_return_on_error(true); $module_classes = array('acp', 'mcp', 'ucp'); - $total = sizeof($module_classes); + $total = count($module_classes); $i = $this->config->get('module_class_index', 0); $module_classes = array_slice($module_classes, $i); diff --git a/phpBB/phpbb/install/module/install_database/task/add_config_settings.php b/phpBB/phpbb/install/module/install_database/task/add_config_settings.php index 8002e3ed97..54114e3f9c 100644 --- a/phpBB/phpbb/install/module/install_database/task/add_config_settings.php +++ b/phpBB/phpbb/install/module/install_database/task/add_config_settings.php @@ -327,7 +327,7 @@ class add_config_settings extends \phpbb\install\task_base } $i = $this->install_config->get('add_config_settings_index', 0); - $total = sizeof($sql_ary); + $total = count($sql_ary); $sql_ary = array_slice($sql_ary, $i); foreach ($sql_ary as $sql) diff --git a/phpBB/phpbb/install/module/install_database/task/add_default_data.php b/phpBB/phpbb/install/module/install_database/task/add_default_data.php index e32101a3f7..c05e5321fb 100644 --- a/phpBB/phpbb/install/module/install_database/task/add_default_data.php +++ b/phpBB/phpbb/install/module/install_database/task/add_default_data.php @@ -99,7 +99,7 @@ class add_default_data extends \phpbb\install\task_base $sql_query = $this->database_helper->split_sql_file($sql_query, $dbms_info[$dbms]['DELIM']); $i = $this->config->get('add_default_data_index', 0); - $total = sizeof($sql_query); + $total = count($sql_query); $sql_query = array_slice($sql_query, $i); foreach ($sql_query as $sql) diff --git a/phpBB/phpbb/install/module/install_database/task/add_tables.php b/phpBB/phpbb/install/module/install_database/task/add_tables.php index f344f91582..dc814f36ef 100644 --- a/phpBB/phpbb/install/module/install_database/task/add_tables.php +++ b/phpBB/phpbb/install/module/install_database/task/add_tables.php @@ -101,7 +101,7 @@ class add_tables extends \phpbb\install\task_base $db_table_schema = @file_get_contents($this->schema_file_path); $db_table_schema = json_decode($db_table_schema, true); - $total = sizeof($db_table_schema); + $total = count($db_table_schema); $i = $this->config->get('add_table_index', 0); $db_table_schema = array_slice($db_table_schema, $i); diff --git a/phpBB/phpbb/install/module/install_finish/task/install_extensions.php b/phpBB/phpbb/install/module/install_finish/task/install_extensions.php index eee13a6581..47ea156c66 100644 --- a/phpBB/phpbb/install/module/install_finish/task/install_extensions.php +++ b/phpBB/phpbb/install/module/install_finish/task/install_extensions.php @@ -157,7 +157,7 @@ class install_extensions extends \phpbb\install\task_base $this->install_config->set('install_extensions_index', $i); - if ($i < sizeof($all_available_extensions)) + if ($i < count($all_available_extensions)) { throw new resource_limit_reached_exception(); } diff --git a/phpBB/phpbb/install/module/update_database/task/update_extensions.php b/phpBB/phpbb/install/module/update_database/task/update_extensions.php index b66847b243..0195b9c661 100644 --- a/phpBB/phpbb/install/module/update_database/task/update_extensions.php +++ b/phpBB/phpbb/install/module/update_database/task/update_extensions.php @@ -206,7 +206,7 @@ class update_extensions extends task_base $this->install_config->set('update_extensions_index', $i); - if ($i < sizeof($all_available_extensions)) + if ($i < count($all_available_extensions)) { throw new resource_limit_reached_exception(); } diff --git a/phpBB/phpbb/install/module/update_filesystem/task/diff_files.php b/phpBB/phpbb/install/module/update_filesystem/task/diff_files.php index 8151a24f2d..2f6048b4fd 100644 --- a/phpBB/phpbb/install/module/update_filesystem/task/diff_files.php +++ b/phpBB/phpbb/install/module/update_filesystem/task/diff_files.php @@ -145,7 +145,7 @@ class diff_files extends task_base { $file_contents[] = file_get_contents($file_to_diff); - if ($file_contents[sizeof($file_contents) - 1] === false) + if ($file_contents[count($file_contents) - 1] === false) { $this->iohandler->add_error_message(array('FILE_DIFFER_ERROR_FILE_CANNOT_BE_READ', $files_to_diff)); unset($file_contents); |