The description given for value returned from form_type_token_value() is the following one.
The data that will appear in the $element_state['values'] collection for this element. Return nothing to use the default.
The function doesn't receive any $element_state parameter; it receives a $element parameter, which is the form array for that element.
I would change the phrase to the following one.
The data that will appear in the $form_state['values'] collection for this element, or nothing to use the default value.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | drupal-fix-return-value-description-3019792-10.patch | 5.36 KB | avpaderno |
| #3 | change-return-value-description-3019792-3.patch | 625 bytes | avpaderno |
Comments
Comment #2
avpadernoComment #3
avpadernoComment #4
vishwac9 commentedPatch applied cleanly changing to RTBC
Comment #5
knyshuk.vova commented+1 to RTBC
Comment #6
jperk224 commentedI am going to attempt to work on this issue. I am new to contributing. This is my first attempt.
Comment #7
jperk224 commentednevermind, I see it's reviewed and tested...
Comment #8
avpadernoComment #9
avpadernoThere are more places where that phrase is used. I am going to provide a patch to fix all those occurrences.
Comment #10
avpadernoComment #11
vicheldt commentedComment #12
vicheldt commentedI was trying to find the incorrect variables before applying the patch and couldn't find any, I also tried to apply the patch to see if it would change anything, and it didn't, so I'm assuming this is already fixed, and I'll move to RTBC.
Comment #13
avpadernoComment #14
poker10 commentedI have reviewed the patch and the only place in Drupal 7 core where the
$element_stateparameter is used is password_confirm_validate function. In D10 inPasswordConfirm::validatePasswordConfirm()function this parameter was also changed to$form_state. Therefore I think these comments changes looks good.Comment #16
mcdruid commentedOne test is showing as failed (PHP 7.2 / MySQL 5.5), but it looks like a random failure completely unrelated to the change here. It's also for a PHP/MySQL combination that we don't have set up for automatic testing for D7. I think it's safe to ignore.
Thanks everyone!