Call to a member function get() on null

Created on 7 August 2025, 3 months ago

Problem/Motivation

I came across this issue when I tried changing the user role.

Steps to reproduce

I believe the website I am working with installed the advanced_email_validation module later at some stage. The email field for user is non required and doesn't have a value in it. When I try to change the role the site breaks and complains:

Call to a member function get() on null in Drupal\advanced_email_validation\Plugin\Validation\Constraint\AEVChangedEmailValidator->valueChanged() (line 72 of docroot/modules/contrib/advanced_email_validation/src/Plugin/Validation/Constraint/AEVChangedEmailValidator.php)

Proposed resolution

Handling the storedEntity object and not access it if the value is missing

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇮🇳India saurabh-2k17

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024