Make the Search API module compatible with PHP 8.0.

CommentFileSizeAuthor
#4 search_api-n3208036-4.patch702 bytesdamienmckenna

Comments

DamienMcKenna created an issue. See original summary.

damienmckenna’s picture

The tests for Metatag use Search API and ran into the following:

exception: [Warning] Line 3280 of sites/all/modules/search_api/search_api.module:
Trying to access array offset on value of type null
fail: [PHP Deprecated] Line 3404 of sites/all/modules/search_api/search_api.module:
 Required parameter $context follows optional parameter $drush

The first one might be because of something in Metatag (haven't dug into it yet), but the second one is definitely a Search API thing.

damienmckenna’s picture

Issue tags: +PHP 8.0, +DrupalFest2021
damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new702 bytes

This fixes the second one, I need to look at other bugs in the Metatag tests before I can work on the other one.

taran2l’s picture

Status: Needs review » Reviewed & tested by the community

$drush parameter must be passed anyway, so it looks good

drunken monkey’s picture

Status: Reviewed & tested by the community » Fixed

Yes, looks great, thanks a lot!
Committed.

Status: Fixed » Closed (fixed)

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

stefanos.petrakis’s picture