Problem/Motivation

When trying to access a Search API based Views page view with the search_api_fulltext URL arg populated, the following error is produced.

Warning: Trying to access array offset on value of type null in /var/www/html/drupal/web/modules/contrib/search_api_opensearch/src/SearchAPI/Query/SpellCheckResultParser.php on line 28

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

lukus created an issue. See original summary.

lukus’s picture

Patch included

kim.pepper made their first commit to this issue’s fork.

kim.pepper’s picture

Status: Active » Needs review

Made the fix a bit simpler and added test coverage.

kim.pepper’s picture

Title: Warning: Trying to access array offset on value of type null in /var/www/html/drupal/web/modules/contrib/search_api_opensearch/src/SearchAPI/Query/SpellCheckResultParser.php on line 28 » Fix access array offset error in SpellCheckResultParser
Assigned: lukus » kim.pepper
Issue summary: View changes

Updated title and IS

acbramley’s picture

Status: Needs review » Reviewed & tested by the community

Looks good!

  • kim.pepper committed 634cae25 on 3.x
    Issue #3457786:  Fix access array offset error in SpellCheckResultParser
    
kim.pepper’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 3.x and 2.x. Thanks!

kim.pepper’s picture

  • kim.pepper committed 5249f357 on 2.x
    Issue #3457786:  Fix access array offset error in SpellCheckResultParser
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.