TypeError: Unsupported operand types: array + null

Created on 1 February 2023, almost 2 years ago
Updated 3 February 2023, almost 2 years ago

When I try to embed view without arguments to the editor and then click to this element to edit it, I get this error:

TypeError: Unsupported operand types: array + null in Drupal\views_entity_embed\Form\ViewsEmbedDialog->buildForm() (line 84

It happens in this code:

$view = Views::getView($view_element['data-view-name']);
$select_arguments = json_decode($view_element['data-view-arguments'], TRUE);
$select_arguments += $select_arguments['filters'];

If the view doesn't have arguments, the form doesn't render 'filters' element, so $select_arguments['filters'] returns NULL.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine lobodacyril

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

Comments & Activities

Production build 0.71.5 2024