From 5dbfd146992b653d4edd76088b8eeff983247a6c Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Sat, 13 Jun 2015 13:10:42 +0200 Subject: [PATCH] [ticket/13941] Workaround to fix the bug on php 5.5 with sqlite3 PHPBB3-13941 --- phpBB/phpbb/tree/nestedset.php | 6 ++++-- 1 file 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) {