Skip to content

wp-stateless-simple-local-avatars-addon: undefined error calling get_user_metadata #823

@donbowman

Description

@donbowman

PHP Warning: Undefined array key 0 in /app/wp-includes/meta.php on line 674 is emitted to console. the parameters it is given are:

$check = apply_filters( "get_{$meta_type}_metadata", null, $object_id, $meta_key, $single, $meta_type );

meta_type: user
meta_key: simple_local_avatar
single: 1
object_id: 2

the value of the filter returns ($check) an empty array, but, the wordpress code returns the first element (0), which is thus undefined.

this causes a bunch of undefined key errors to console.

this is with wordpress 6.9 (and perhaps older).

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