Hi,

We are using the FacetAPI module and a Drupal theme with strict typing in parameters of preprocess hooks.

So, we are using [theme]_block_view_alter(array &$build, $block) in our theme.

However, this module is not returning an array in facetapi_block_view() and it can lead to some issue on our sites.

According to the official documentation, hook_block_view() is supposed to return an empty array instead of null.

The following one-line patch will fix this issue.

Original issue on Github: https://github.com/ec-europa/atomium/issues/113

CommentFileSizeAuthor
#2 2976814.patch433 bytespol

Comments

Pol created an issue. See original summary.

pol’s picture

Status: Active » Needs review
StatusFileSize
new433 bytes
pol’s picture

Issue summary: View changes
pol’s picture

  • joseph.olstad committed f740912 on 7.x-1.x authored by Pol
    Issue #2976814 by Pol: hook_block_view() should not return null
    
joseph.olstad’s picture

Status: Needs review » Fixed

fixed in the dev branch only

  • joseph.olstad committed efa7e5b on 7.x-2.x authored by Pol
    Issue #2976814 by Pol: hook_block_view() should not return null
    
joseph.olstad’s picture

pushed into dev, but not released (yet)

pol’s picture

Nice!

Status: Fixed » Closed (fixed)

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

joseph.olstad’s picture