Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-11437

Sphinx debug assert failed when no search results are found

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 3.1.0-dev
    • 3.1.0-a1
    • Search
    • None

    Description

      [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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: