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

Sphinx debug assert failed when no search results are found

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.0-dev
    • Fix Version/s: 3.1.0-a1
    • Component/s: Search
    • Labels:
      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

            • Assignee:
              dhruv.goel92 Dhruv Goel
              Reporter:
              nickvergessen Joas Schilling
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: