Opened 3 years ago
Closed 3 years ago
#13107 closed defect (bug) (fixed)
Failure to load popular tags results in PHP errors in plugin-install.php
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.0 |
| Component: | Administration | Version: | 3.0 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
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)
Result:
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.
Attachments (1)
Note: See
TracTickets for help on using
tickets.

I should add that this also requires the wporg_popular_tags option to be stale, otherwise a web query will not take place.