Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docblock for field_validate_field(): should be $field not $field_name #5685

Closed
herbdool opened this issue Jul 15, 2022 · 4 comments · Fixed by backdrop/backdrop#4160
Closed

Comments

@herbdool
Copy link

Description of the bug

Incorrect parameter in docblock: https://github.com/backdrop/backdrop/blob/28101daf01318500ea1a8362279a64f3d77c04d9/core/modules/field/field.crud.inc#L229

Should be something like:

/**
 * Validates a field configuration.
 *
 * @param $field
 *   A field structure. $field['field_name'], $field['type'] must be provided.
 * @param $update
 *   Whether this is a new or existing field.
 */
function field_validate_field($field, $update = FALSE) {
@kiamlaluno
Copy link
Member

The suggested change is correct and the PR changes the code as suggested.

@bugfolder
Copy link

bugfolder commented Sep 10, 2023

There's a typo left in the code, suggested change noted in the PR.

Since this is documentation-only, I don't think that testing is needed.

@bugfolder
Copy link

Code change now looks good. PHPCS is complaining (legitimately) about an unrelated code formatting issue, but that's out of scope of this issue. LGTM, RTBC.

@quicksketch
Copy link
Member

Merged backdrop/backdrop#4160 into 1.x and 1.26.x. Sorry for the delay, but welcome to @PrajwalBorkar! Thanks so much for making the PR and I appreciate the work you put into incorporating feedback.

Thanks @bugfolder and @kiamlaluno for reviewing and thanks @herbdool for filing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants