When hook_boost_is_cacheable is invoked a compare is done using '!= NULL'. This since false != NULL results in false.

Some debugging showed me that my hook implementation had no effect which I fixed by changing the != to !== (see attached patch).

CommentFileSizeAuthor
boost-hook_boost_is_cacheable.patch511 byteshelmo

Comments

mikeytown2’s picture

Title: hook_boost_is_cacheable not honoured » hook_boost_is_cacheable not honored
Status: Active » Needs review
mikeytown2’s picture

Status: Needs review » Fixed

committed

Status: Fixed » Closed (fixed)

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

firebus’s picture

why do we have

    if (($result = module_invoke($module, 'boost_is_cacheable', $path)) !== NULL) {
      if (!$result) {
        return FALSE;
      }
    }

when we could have

    if (module_invoke($module, 'boost_is_cacheable', $path) === FALSE) {
      return FALSE;
    }
helmo’s picture

@firebus: Your example would need an additional ! to make it correct. The code has already changed to "return $result".