Undefined array key warning

Created on 28 April 2023, about 1 year ago
Updated 6 February 2024, 5 months ago

Problem/Motivation

On changing or updating a block configuration with a "Block with overrides" I get the following warning:

Warning: Undefined array key "enabled" in Drupal\views_block_override\Plugin\views\display\ViewsBlockOverride->blockSubmit() (line 245 of modules/views_block_override/src/Plugin/views/display/ViewsBlockOverride.php).

Steps to reproduce

Place an override block and click "Save Block"

Proposed resolution

Change the test on line 245 from
if ($settings['enabled'])
to
if (!empty($settings['enabled']))

Simple! Unless it is a problem that $settings['enabled'] is not defined under these circumstances.

🐛 Bug report
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

🇺🇸United States Peter Pulsifer

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

Comments & Activities

Production build 0.69.0 2024