aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/tree/nestedset.php
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2015-06-13 13:10:42 +0200
committerTristan Darricau <tristan.darricau@sensiolabs.com>2015-06-13 13:20:55 +0200
commit5dbfd146992b653d4edd76088b8eeff983247a6c (patch)
treec994695ba8f5ac0a99440a5aa8a6a35599f3de27 /phpBB/phpbb/tree/nestedset.php
parentd8343f2108e2d84814c9b548b1587313606702f7 (diff)
downloadforums-5dbfd146992b653d4edd76088b8eeff983247a6c.tar
forums-5dbfd146992b653d4edd76088b8eeff983247a6c.tar.gz
forums-5dbfd146992b653d4edd76088b8eeff983247a6c.tar.bz2
forums-5dbfd146992b653d4edd76088b8eeff983247a6c.tar.xz
forums-5dbfd146992b653d4edd76088b8eeff983247a6c.zip
[ticket/13941] Workaround to fix the bug on php 5.5 with sqlite3
PHPBB3-13941
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)
{