Problem/Motivation
This is a result of #3268058: Media sources should declare dependency on Provider Bucket
The config data might not contain any dependencies, or might not declare module dependencies. Though it's not good to have empty dependencies, the config event subscriber should check for an array before using `array_search` function. In PHP 8.1 (at least) it produces a fatal error.
The error message is: "TypeError: array_search(): Argument #2 ($haystack) must be of type array, null given in array_search()"
Steps to reproduce
Using php >= 8.1 attempt to set a media type config to have empty dependencies and observe the error.
`drush cset media.type.video dependencies '{}' --input-format=yaml`
Proposed resolution
Check for an array before searching within it.
Remaining tasks
User interface changes
None
API changes
None
Data model changes
None
Issue fork oembed_providers-3278161
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
pookmish commentedComment #6
chris burge commented@pookmish - Thanks for debugging this bug and opening an MR