Error: Unsupported operand types

Created on 23 August 2021, almost 3 years ago
Updated 14 September 2023, 10 months ago

I just downloaded (composer require 'drupal/bridtv:2.0.x-dev@dev') and installed the module (drush en bridtv) and wanted to test it. First, as I do not yet have an API Key (seems to require paid plan) I wanted to see what fields get provided by the module and first got the following error:

Error: Unsupported operand types in Drupal\bridtv\Plugin\Field\FieldWidget\BridtvReferenceAutocompleteWidget->formElement() (line 77 in /app/docroot/modules/contrib/bridtv/src/Plugin/Field/FieldWidget/BridtvReferenceAutocompleteWidget.php)

I fixed that by cnaging the return value in \Drupal\bridtv\BridInfoNegotiator::getPlayersList() from NULL to empty array: return []; as otherwise \Drupal\bridtv\Plugin\Field\FieldWidget\BridtvReferenceAutocompleteWidget::formElement() fails on adding NULL to the array.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany osopolar πŸ‡©πŸ‡ͺ GER 🌐

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024