Opened 3 years ago
Last modified 3 years ago
#55387 assigned defect (bug)
$wp_filesystem->dirlist() can return false and that should be checked for before iterating over the return value
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | 2.8 |
Component: | Filesystem API | Keywords: | has-patch |
Focuses: | Cc: |
Description
There are a number of cases in core (e.g., https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/class-wp-upgrader.php#L500) where the return value of $wp_filesystem->dirlist()
is assumed to be an array. But since that method can return false
, we should always check for that before iterating (or calling array_keys()
or array_values()
on it) over the return value.
Change History (4)
This ticket was mentioned in PR #2411 on WordPress/wordpress-develop by kapilpaul.
3 years ago
#2
- Keywords has-patch added; needs-patch removed
Note: See
TracTickets for help on using
tickets.
Trac ticket: https://core.trac.wordpress.org/ticket/55387