Problem/Motivation

I am trying to use php 7.4. Everything seems to be working, although there are some (notice) messages:
- Trying to access array offset on value of type bool in at_generate_html_classes()/adaptivetheme_page_alter()/

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

edvanleeuwen created an issue. See original summary.

edvanleeuwen’s picture

Issue summary: View changes
danchadwick’s picture

Status: Active » Needs review
StatusFileSize
new1.14 KB

menu_get_item() can return FALSE. This patch protects against referencing it as if it were an array.

danchadwick’s picture

Found a second call to menu_get_item(), which also needs fixing.

edvanleeuwen’s picture

Ok, tested and verified.

Thanks for the patch!

Irbis’s picture

Patch #4 also works for me:

Environment versions:

Drupal: 7.79
PHP: 7.4.16
Web-server: Apache/2.4.46 (Ubuntu)
DBMS version: MySQL 8.0.23
Theme: Mix and Match 7.x-2.1 based on AdaptiveTheme 7.x-3.4

hey_germano’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for the patch! I can confirm this clears up the notices. The logic looks good. Moving to RTBC.

mattbloomfield’s picture

I've committed this to the 7.x-3.x branch. It should make its way into a release sometime in the near future.

mattbloomfield’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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