Problem/Motivation

Using the module with PHP 7.4 generates errors:
Notice: Trying to access array offset on value of type null in taxonomy_menu_trails_init() (line 102 of /var/www/profiles/ecitizen/modules/contrib/taxonomy_menu_trails/taxonomy_menu_trails.module).

Proposed resolution

Update code syntax.

CommentFileSizeAuthor
#3 errors_when_using_php_74-3206470-3.patch1.54 KBwylbur
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

wylbur created an issue. See original summary.

wylbur’s picture

Issue tags: -undefined +PHP 7.4
wylbur’s picture

Here's a patch that resolved the errors for us. This patch is based on the DEV branch.

poker10’s picture

Are we sure that the isset is the correct way instead of !empty check? If the value (somehow) would be 0, it will also pass that condition. So this patch could be potentially changing the logic (though not intentionally). See the another approach here: #3206489: array offset notice.

poker10’s picture

Status: Active » Needs review

The correct status here should be Needs review.