Undefined array key "addable"

Created on 4 June 2025, about 2 months ago

Problem/Motivation

When running Behat tests or executing functionality that triggers SensorManager::getDefinitions(), a PHP warning is thrown:

Warning: Undefined array key "addable" in docroot/modules/contrib/monitoring/src/Sensor/SensorManager.php line 318

This occurs because the code assumes every sensor plugin definition includes the 'addable' key, which is not always true. This results in noisy logs and can potentially cause issues in automated test pipelines.

Steps to reproduce

This warning gets triggered for in the automated test pipelines.

Proposed resolution

if (!isset($sensor_definition['addable']) || !$sensor_definition['addable']) {

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇦🇺Australia Nadim Hossain

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

Comments & Activities

Production build 0.71.5 2024