Skip to content

acf_get_fields function access array indexes 'key' and 'ID' without checking their existence #266

Open
@simplyrapf

Description

@simplyrapf

After updating from 5.7.10 to 5.8.0, I get the following notices:

Notice: Undefined index: key in /plugins/advanced-custom-fields-pro/includes/acf-field-functions.php on line 349

Notice: Undefined index: ID in /plugins/advanced-custom-fields-pro/includes/acf-field-functions.php on line 361

This is usually not a problem, but when trying to use with other plugins like https://www.wpgraphql.com/acf

It causes an issue where my graphql endpoint breaks because of this function.

ACF Pro version: 5.8.0
PHP version: 7.1.20
ACF Implementation: Flexible content component using cloned ACF field groups as layouts.

This issue has already been reported in the support forums:
https://support.advancedcustomfields.com/forums/topic/acf-field-functions-php349-undefined-index-key/

And the solution for it has been posted but no PR was ever created.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions