Skip to content

Dead code in media command class #190

Description

@ernilambar

Bug Report

Describe the current, buggy behavior

Line 627 : https://github.com/wp-cli/media-command/blob/main/src/Media_Command.php#L627

There is conditional of is_wp_error() for $metadata which is output of wp_generate_attachment_metadata(). Since this function always return an array, my VSCode is flagging as error. Not sure about the background of the code. So mentioning here as an issue.

Ref: https://developer.wordpress.org/reference/functions/wp_generate_attachment_metadata/

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions