Problem/Motivation

Currently if you include media_duplicates in an install profile and try to install on D9 (probably D8 as well), you'll receive the following error on the install requirements screen:
array_merge(): Expected parameter 2 to be an array, null given in drupal_check_profile()

The root of the issue appears to be that media duplicates is returning null if the requirements function is called in a phase other then 'runtime'

if ($phase !== 'runtime') {
    return;
}

Drupal is always expecting at least an empty array to be returned when that function is called, so it breaks the install process.

Proposed resolution

Slightly refactor the media duplicates require function to always return an array, which is what this patch does.

Comments

jacobbell84 created an issue. See original summary.

  • jacobbell84 authored deb7615 on 8.x-1.x
    Issue #3194369 by jacobbell84: Including Media Duplicates in a fresh...
nterbogt’s picture

Status: Needs review » Fixed

I'll roll a new release with this change soon. Thanks for the work.

Status: Fixed » Closed (fixed)

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