Problem/Motivation
Warning: Undefined array key 1 in _unwanted_email_registration_filter_email() (line 63 of modules/contrib/unwanted_email_registration/unwanted_email_registration.module).
Steps to reproduce
Register for a new account with "example@gmail.com"
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | explode-string-deprecated-3426749-4.patch | 692 bytes | manikandan era |
Issue fork unwanted_email_registration-3426749
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
abdulaziz zaidWhat the php version and drupal?
Comment #3
grasmash commentedThis happens because for some reason, _unwanted_email_registration_filter_email() is called twice. The first time $email is properly populated, the second time it is NULL.
PHP 8.2, Drupal 10.2.3.
Comment #4
manikandan era commentedComment #5
vensiresComment #6
m.managoudis commentedComment #8
m.managoudis commentedPrevious patch seems not fixing the problem.
The problem is that code doesn't takes into account email with NULL value (for example Anonymous user with uid == 0)
The MR below skips empty email values and continues the loop to check the rest emails:
https://git.drupalcode.org/project/unwanted_email_registration/-/merge_r...
Comment #9
grasmash commentedComment #10
vensiresIt's a really small but working change, so if no one else has any objection, I set it as RTBC.
Comment #12
abdulaziz zaidMerged.