Problem/Motivation

When upgrading to PHP 7.4, the Custom Search module throws a notice on /update.php:
Notice: Trying to access array offset on value of type bool in custom_search_theme() (line 705 of /code/sites/all/modules/custom_search/custom_search.module).

Proposed resolution

Attached patch resolves notice.

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

Robert DeArmond created an issue. See original summary.

phily’s picture

Status: Patch (to be ported) » Reviewed & tested by the community

As per status guidelines:

Patch (to be ported) (#)
The patch has been successfully committed to a branch of the project, and still needs to be committed to another, but the current patch doesn't apply to the target branch and needs to be modified in order to do so.

This issue rather "Needs review".

Patch tested with success using Drupal 7.91 and Custom Search 7.x-1.20. Thanks to @Robert DeArmond
It would need another reviewer before going to RTBC status but for 1 line of code fix, I think it's safe to set it to RTBC right now so it can be committed.

vinmassaro’s picture

StatusFileSize
new2.01 KB

Patch works, thanks. I had trouble applying it since it should be made from the module directory, so here is an updated patch.

vinmassaro’s picture

StatusFileSize
new1.81 KB

Oops, wrong patch. New one here.

codebymikey’s picture

StatusFileSize
new1.07 KB

Reupload a patch addressing only the affected parts since the last uploaded version wasn't applying for me.

urvashi_vora made their first commit to this issue’s fork.

urvashi_vora’s picture

Reviewed and tested the patch #5, works well for me as well.

LGTM, RTBC++

Committing the changes for helping the maintainer.

  • loon committed 801a1161 on 7.x-1.x authored by urvashi_vora
    Issue #3255008: Notice: Trying to access array offset on value of type...
loon’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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