mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
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
This commit is contained in:
commit
bf7a4f629d
1 changed files with 4 additions and 2 deletions
|
@ -837,7 +837,10 @@ abstract class nestedset implements \phpbb\tree\tree_interface
|
||||||
' . $this->get_sql_where('AND') . '
|
' . $this->get_sql_where('AND') . '
|
||||||
ORDER BY ' . $this->column_left_id . ', ' . $this->column_item_id . ' ASC';
|
ORDER BY ' . $this->column_left_id . ', ' . $this->column_item_id . ' ASC';
|
||||||
$result = $this->db->sql_query($sql);
|
$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
|
// First we update the left_id for this module
|
||||||
if ($row[$this->column_left_id] != $new_id)
|
if ($row[$this->column_left_id] != $new_id)
|
||||||
|
@ -862,7 +865,6 @@ abstract class nestedset implements \phpbb\tree\tree_interface
|
||||||
}
|
}
|
||||||
$new_id++;
|
$new_id++;
|
||||||
}
|
}
|
||||||
$this->db->sql_freeresult($result);
|
|
||||||
|
|
||||||
if ($acquired_new_lock)
|
if ($acquired_new_lock)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue