aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/tree/nestedset.php
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2015-06-13 15:18:44 +0200
committerAndreas Fischer <bantu@phpbb.com>2015-06-13 15:18:44 +0200
commite0d1f811145a0b49809147ae61b041672ac7cd06 (patch)
tree596efef78127709457758dc386ead3ff1e0a2096 /phpBB/phpbb/tree/nestedset.php
parenta49bd38e833fbc42fdafd000872a810e6c6c37e4 (diff)
parentbf7a4f629d2f5522f5a24404ecc5e884e7cedf84 (diff)
downloadforums-e0d1f811145a0b49809147ae61b041672ac7cd06.tar
forums-e0d1f811145a0b49809147ae61b041672ac7cd06.tar.gz
forums-e0d1f811145a0b49809147ae61b041672ac7cd06.tar.bz2
forums-e0d1f811145a0b49809147ae61b041672ac7cd06.tar.xz
forums-e0d1f811145a0b49809147ae61b041672ac7cd06.zip
Merge branch '3.1.x'
* 3.1.x: [ticket/13941] Workaround to fix the bug on php 5.5 with sqlite3
Diffstat (limited to 'phpBB/phpbb/tree/nestedset.php')
-rw-r--r--phpBB/phpbb/tree/nestedset.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/phpBB/phpbb/tree/nestedset.php b/phpBB/phpbb/tree/nestedset.php
index 57d109652e..8490c7c299 100644
--- a/phpBB/phpbb/tree/nestedset.php
+++ b/phpBB/phpbb/tree/nestedset.php
@@ -837,7 +837,10 @@ abstract class nestedset implements \phpbb\tree\tree_interface
' . $this->get_sql_where('AND') . '
ORDER BY ' . $this->column_left_id . ', ' . $this->column_item_id . ' ASC';
$result = $this->db->sql_query($sql);
- while ($row = $this->db->sql_fetchrow($result))
+ $rows = $this->db->sql_fetchrowset($result);
+ $this->db->sql_freeresult($result);
+
+ foreach ($rows as $row)
{
// First we update the left_id for this module
if ($row[$this->column_left_id] != $new_id)
@@ -862,7 +865,6 @@ abstract class nestedset implements \phpbb\tree\tree_interface
}
$new_id++;
}
- $this->db->sql_freeresult($result);
if ($acquired_new_lock)
{