aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/tree/nestedset.php
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2015-06-13 15:18:43 +0200
committerAndreas Fischer <bantu@phpbb.com>2015-06-13 15:18:43 +0200
commitbf7a4f629d2f5522f5a24404ecc5e884e7cedf84 (patch)
tree014141cdd6837429d8c97268437cf50aaba25cba /phpBB/phpbb/tree/nestedset.php
parent9238d2835367bb7386a539d4bf9db9680be1793a (diff)
parent5dbfd146992b653d4edd76088b8eeff983247a6c (diff)
downloadforums-bf7a4f629d2f5522f5a24404ecc5e884e7cedf84.tar
forums-bf7a4f629d2f5522f5a24404ecc5e884e7cedf84.tar.gz
forums-bf7a4f629d2f5522f5a24404ecc5e884e7cedf84.tar.bz2
forums-bf7a4f629d2f5522f5a24404ecc5e884e7cedf84.tar.xz
forums-bf7a4f629d2f5522f5a24404ecc5e884e7cedf84.zip
Merge pull request #3704 from Nicofuma/ticket/13941
[ticket/13941] Workaround to fix the bug on php 5.5 with sqlite3 * Nicofuma/ticket/13941: [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)
{