Doesn't matter in which phase hook_requirements is, it is expected to return an array every time. If it returns NULL, it will break under certain conditions.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chr.fritsch created an issue. See original summary.

chr.fritsch’s picture

chr.fritsch’s picture

Status: Active » Needs review
slashrsm’s picture

In what kind of situations will this break? It seems that ModuleHandlerInterface::invokeAll() is able to handle it.

chr.fritsch’s picture

array_merge in drupal_check_profile cant handle it. We try to enable media_entity in an install profile and there it breaks.

  • slashrsm committed 9ce472e on 8.x-1.x authored by chr.fritsch
    Issue #2717375 by chr.fritsch, slashrsm: hook_requirements expected to...
slashrsm’s picture

Status: Needs review » Fixed

Right. I wasn't able to find this usage, when I was searching codebase. Committed.

Thanks!

Status: Fixed » Closed (fixed)

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