Warning: Undefined array key 0 in eval() (line 1 of modules/contrib/custom_formatters/src/Plugin/CustomFormatters/FormatterType/PHP.php(40) : eval()'d code).

Created on 30 November 2023, 7 months ago
Updated 2 January 2024, 6 months ago

Problem/Motivation

Using custom formatter in a contentype, these warnings come after resetting facets, which show the search results

Steps to reproduce

Use searchapi, reset facets.

Warning: Undefined array key 0 in eval() (line 1 of modules/contrib/custom_formatters/src/Plugin/CustomFormatters/FormatterType/PHP.php(40) : eval()'d code).
Warning: Trying to access array offset on value of type null in eval() (line 1 of modules/contrib/custom_formatters/src/Plugin/CustomFormatters/FormatterType/PHP.php(40) : eval()'d code).

Proposed resolution

Remove the warnings by programming situation that undefined array wll not happen.
I am not a programmer sorry.
May be something like this is necessary: https://www.drupal.org/files/issues/2022-06-22/3291862-1-warning-undefin... โ†’

Thanks for your quick reply in advance, greetings,

๐Ÿ› Bug report
Status

RTBC

Version

4.0

Component

Engine: PHP

Created by

๐Ÿ‡ณ๐Ÿ‡ฑNetherlands Summit

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024