You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Activity
danielbachhuber commentedon Feb 20, 2024
It looks like this code has been in here for quite a while:
media-command/php/commands/media.php
Lines 70 to 75 in 8717808
I'd be open to removing it if we have sufficient test coverage around it (e.g. a test case for the empty attachment data scenario).