Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-11437

Sphinx debug assert failed when no search results are found

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.1.0-a1
    • 3.1.0-dev
    • Search
    • None

      [phpBB Debug] PHP Warning: in file [ROOT]/includes/sphinxapi.php on line 708: assert() [function.assert]: Assertion failed

      The problem is public function keyword_search()

      		$result_count = $result['total_found'];
       
      		if ($start >= $result_count)
      		{
      			$start = floor(($result_count - 1) / $per_page) * $per_page;
       
      			$this->sphinx->SetLimits((int) $start, (int) $per_page, SPHINX_MAX_MATCHES);

      When $start and $result_count we should not go into the if statement.
      In the statement we try to go one page back, which gives a negative start value, causing the debug message

            dhruv.goel92 Dhruv Goel [X] (Inactive)
            nickvergessen Joas Schilling
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: