entityViewModeAlter throws an exception in php 8.2

Created on 1 March 2023, over 1 year ago

Problem/Motivation

The entityViewModeAlter() expects an array as third parameter but it's NULL whenparagraphs_viewmode_entity_view_mode_alter() calls the method.

With PHP 8.2+ this results in an exception.

Proposed resolution

Remove the $context parameter from the paragraphs_viewmode_entity_view_mode_alter() and the entityViewModeAlter().
hook_entity_view_mode_alter() doesn't have a $context parameter anyway so there is probably no reason to have it.

πŸ› Bug report
Status

Active

Version

1.1

Component

Code

Created by

πŸ‡―πŸ‡΅Japan orakili

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024