get error of `Call to a member function getKeyValue() on null`

Created on 12 March 2024, 10 months ago
Updated 20 March 2024, 9 months ago

Problem/Motivation

 [error]  Error: Call to a member function getKeyValue() on null in Drupal\section_purge\Plugin\Purge\Purger\SectionPurgeBase->getOptions() (line 202 of /app/docroot/modules/contrib/section_purge/src/Plugin/Purge/Purger/SectionPurgeBase.php) #0 /app/docroot/modules/contrib/section_purge/src/Plugin/Purge/Purger/SectionBundledPurge.php(81): Drupal\section_purge\Plugin\Purge\Purger\SectionPurgeBase->getOptions()

Steps to reproduce

run `drush cron`

Proposed resolution

hey everyone, the \Drupal::service('key.repository') call is capable of returning three types of values: EntityInterface, Key, or null. However, the current implementation lacks a mechanism to handle the null return value. This could potentially lead to failures in cron jobs.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Closed: won't fix

Version

4.0

Component

Code

Created by

🇦🇺Australia yovince Melbourne

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

Comments & Activities

Production build 0.71.5 2024