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.

Comments

kiamlaluno created an issue. See original summary.

avpaderno’s picture

Issue summary: View changes
avpaderno’s picture

Status: Active » Needs review
StatusFileSize
new625 bytes
vishwac9’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +ContributionWeekend2019

Patch applied cleanly changing to RTBC

knyshuk.vova’s picture

+1 to RTBC

jperk224’s picture

I am going to attempt to work on this issue. I am new to contributing. This is my first attempt.

jperk224’s picture

nevermind, I see it's reviewed and tested...

avpaderno’s picture

Issue summary: View changes
avpaderno’s picture

Issue summary: View changes

There are more places where that phrase is used. I am going to provide a patch to fix all those occurrences.

avpaderno’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new5.36 KB
vicheldt’s picture

Assigned: Unassigned » vicheldt
vicheldt’s picture

Status: Needs review » Reviewed & tested by the community

I 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.

avpaderno’s picture

Assigned: vicheldt » Unassigned
poker10’s picture

I have reviewed the patch and the only place in Drupal 7 core where the $element_state parameter is used is password_confirm_validate function. In D10 in PasswordConfirm::validatePasswordConfirm() function this parameter was also changed to $form_state. Therefore I think these comments changes looks good.

  • mcdruid committed f93a0f38 on 7.x
    Issue #3019792 by apaderno, poker10: The description for the value...
mcdruid’s picture

Status: Reviewed & tested by the community » Fixed

One 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!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.