The following notice pops up when I try to create a new user:
Notice: Undefined index: user_picture in Drupal\Core\Entity\EntityFormController->submitEntityLanguage() (line 438 of core/lib/Drupal/Core/Entity/EntityFormController.php).
When doing this, I'm logged in as user 1.
When I look into the code I see the following statement:
$previous_langcode = $form[$field_name]['#language'];
I guess the index "user_picture" isn't present in the array $form. Should we introduce an isset() to check if the index is present in the array?
Comment | File | Size | Author |
---|---|---|---|
#6 | issue-2030551-6.patch | 3.51 KB | marcingy |
#4 | issue-2030551-4.patch | 3.6 KB | marcingy |
#3 | issue-2030551-3.patch | 3.21 KB | marcingy |
#2 | issue-2030551-2.patch | 2.04 KB | marcingy |
Comments
Comment #1
marcingy CreditAttribution: marcingy commentedThis only happens when we use the standard install and infact we get another notice when on php 5.4 which I will create another issue for.
Comment #2
marcingy CreditAttribution: marcingy commentedTest added to find the notice. This will fail.
Comment #3
marcingy CreditAttribution: marcingy commentedAnd now the patch
Comment #4
marcingy CreditAttribution: marcingy commentedMeh must save before creating patch
Comment #5
alexpottManually tested and the simpletest looks good.
Minor nit...
The comment here doesn't look right...
Comment #6
marcingy CreditAttribution: marcingy commentedComment cleaned up.
Comment #7
jessebeach CreditAttribution: jessebeach commentedI just ran into this issue. Tested the patch and it removes the error. The code looks sensible. Setting to RTBC.
Comment #8
alexpottCommitted a7ef6f3 and pushed to 8.x. Thanks!