aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/tree/nestedset.php
diff options
context:
space:
mode:
authorrxu <rxu@mail.ru>2017-06-28 00:58:03 +0700
committerMarc Alexander <admin@m-a-styles.de>2018-01-01 13:56:04 +0100
commitf8fbe3793680af1dae2db2829cfc84068831c52f (patch)
tree54c7108b28fb58688a8695a0b592c163314a09f9 /phpBB/phpbb/tree/nestedset.php
parentff18802656e72981f6ecb613d756bc19f2462689 (diff)
downloadforums-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/tree/nestedset.php')
-rw-r--r--phpBB/phpbb/tree/nestedset.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/phpbb/tree/nestedset.php b/phpBB/phpbb/tree/nestedset.php
index 7149513fd9..c02deaebf4 100644
--- a/phpBB/phpbb/tree/nestedset.php
+++ b/phpBB/phpbb/tree/nestedset.php
@@ -706,7 +706,7 @@ abstract class nestedset implements \phpbb\tree\tree_interface
{
$acquired_new_lock = $this->acquire_lock();
- $diff = sizeof($subset_items) * 2;
+ $diff = count($subset_items) * 2;
$sql_subset_items = $this->db->sql_in_set($this->column_item_id, $subset_items);
$sql_not_subset_items = $this->db->sql_in_set($this->column_item_id, $subset_items, true);
@@ -746,7 +746,7 @@ abstract class nestedset implements \phpbb\tree\tree_interface
*/
protected function prepare_adding_subset(array $subset_items, array $new_parent)
{
- $diff = sizeof($subset_items) * 2;
+ $diff = count($subset_items) * 2;
$sql_not_subset_items = $this->db->sql_in_set($this->column_item_id, $subset_items, true);
$set_left_id = $this->db->sql_case($this->column_left_id . ' > ' . (int) $new_parent[$this->column_right_id], $this->column_left_id . ' + ' . $diff, $this->column_left_id);