Undefined index: description in

Hello,
I get this notification when I scan my site: Notice : Undefined index: description in /home/bfrstfi/www/wp-content/plugins/envato-market/inc/class-envato-market-api.php on line 384
What should I do?
Thanks

1 Like

Have you tried to update the extension if there’s a newer version?

Yes, the latest version is installed.

I have this issue too - a warning comes up in the Wordpress admin Warning: Undefined array key “description” … line 384

Update the plugin

I’m using version 2.0.8-- as far as I can tell, that’s the latest. The error occurs on this line

‘description’ => self::remove_non_unicode( strip_tags( $plugin[‘wordpress_plugin_metadata’][‘description’] ) ),

I was wondering-- all the other lines in that array start with ( ! empty
except this one

Yeah, it looks like they forgot to wrap that line in an empty() check like the rest… oops! I’ll submit a pull request to fix it later, but I honestly wouldn’t expect it to get merged in for a few months at best. :eyes:

Perhaps you can silence warnings in your dashboard for now? It’s mostly guaranteed that they won’t become errors until PHP 9 or later, after all. Or, if you’re comfortable changing the plugin’s code, you can replace the line with this atrocity:

'description' => ( ! empty( $plugin['wordpress_plugin_metadata']['description'] ) ? self::remove_non_unicode( strip_tags( $plugin['wordpress_plugin_metadata']['description'] ) ) : '' ),
1 Like

Thank you. Yes I think that’s fine for now. I haven’t seen any errors on the front end.

1 Like

This error is still happening even though there was more than one plugin update since then. Again, no problems on user side but annoying warnings on WP admin side.