1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/15540] Fix tests

PHPBB3-15540
This commit is contained in:
rubencm
2021-03-23 01:43:01 +01:00
parent 16220058d3
commit 5c67eabeed
11 changed files with 44 additions and 23 deletions

View File

@@ -296,6 +296,11 @@ abstract class base implements search_backend_interface
{
$rows = $this->get_posts_between($post_counter + 1, $post_counter + self::BATCH_SIZE);
if ($this->db->sql_buffer_nested_transactions())
{
$rows = iterator_to_array($rows);
}
foreach ($rows as $row)
{
// Indexing enabled for this forum
@@ -415,7 +420,7 @@ abstract class base implements search_backend_interface
AND post_id <= ' . $final_id;
$result = $this->db->sql_query($sql);
while($row = $this->db->sql_fetchrow($result))
while ($row = $this->db->sql_fetchrow($result))
{
yield $row;
}

View File

@@ -123,7 +123,7 @@ class fulltext_mysql extends base implements search_backend_interface
public function is_available(): bool
{
// Check if we are using mysql
if($this->db->get_sql_layer() != 'mysqli')
if ($this->db->get_sql_layer() != 'mysqli')
{
return false;
}

View File

@@ -649,7 +649,8 @@ class fulltext_sphinx implements search_backend_interface
*/
public function delete_index(int &$post_counter = null): ?array
{
if ($this->index_created()) {
if ($this->index_created())
{
$this->db_tools->sql_table_drop(SPHINX_TABLE);
}