Failure to load popular tags results in PHP errors in plugin-install.php
|Reported by:||solarissmoke||Owned by:|
Steps to reproduce:
- Block server access to Wordpress servers (simulating what happens when plugins_api() fails to connect to them)
- Visit plugins install page (wp-admin/plugin-install.php)
Undefined index: name in \wplatest\wp-admin\includes\plugin-install.php on line 147 Undefined index: name in \wplatest\wp-admin\includes\plugin-install.php on line 149 etc etc..
I think the problem is on line 67 of plugin-install.php. If an error occurs, install_popular tags is returning a WP_Error object. But the calling function is expecting an array of tags, and doesn't check that the array is valid before attempting to walk it.