Problem/Motivation

The implementation of hook_boost_is_cacheable() seems wrong. The boost module expects an array with "is_cacheable" key, not a boolean, see at https://git.drupalcode.org/project/boost/-/blob/7.x-1.x/boost.module#L723
It creates the following notice in watchdog:
Notice: Trying to access array offset on value of type bool boost_is_cacheable() függvényben (/app/web/sites/all/modules/boost/boost.module 738 sor).

Proposed resolution

Change the way of return

Comments

danyg created an issue. See original summary.

danyg’s picture

Title: Boost cacheable expect an array not a boolean » Boost cacheable expects an array not a boolean
danyg’s picture

Status: Active » Needs review
StatusFileSize
new615 bytes

I'M attaching the patch that fixes this issue.

grimreaper’s picture

Assigned: Unassigned » grimreaper

  • Grimreaper committed 27d71b8 on 7.x-1.x authored by danyg
    Issue #3209275 by danyg, Grimreaper: Boost cacheable expects an array...
grimreaper’s picture

Assigned: grimreaper » Unassigned
Status: Needs review » Fixed

Thanks for the report nice catch.

I guess it was still some legacy code for Drupal 6. https://git.drupalcode.org/project/boost/-/blob/6.x-1.x/boost.module#L2845

I will make a new release.

Status: Fixed » Closed (fixed)

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