-
Notifications
You must be signed in to change notification settings - Fork 42
Closed
Description
Bug Report
- [✓] Yes, I reviewed the contribution guidelines.
- [✓] Yes, more specifically, I reviewed the guidelines on how to write clear bug reports.
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/