I recently got this error on the Add Plugins page of my website and it freaked me out. What was causing it?
Notice: Undefined property: stdClass::$plugin in /xxx/wp-includes/class-wp-list-util.php on line 152
Using WP Debug, I found more of the error message was:
WP_Plugin_Install_List_Table->prepare_items, wp_filter_object_list, WP_List_Util->pluck
Here’s how to fix it:
1) Deactivate Plugins
I deactivated all plugins. But for me, the issues was still there.
2) Change Theme
You can change your theme. I changed theme, but the issue remained. Crap!
3) Reinstall WordPress
I re-installed WordPress via Dashboard > Updates and clicking Re-install Now.
This process updates WordPress from source (just like doing any normal WordPress update), and doesn’t affect your custom data or settings. But hey, take a backup before you do this anyway.
4) Clear Transients
I then cleared transients using WP-CLI.
wp transient delete --all
If you don’t have WP-CLI installed, you can use a plugin like https://wordpress.org/plugins/artiss-transient-cleaner/ or my favourite Litespeed Cache.