#16499 closed defect (bug) (fixed)
wp_list_filter() no longer watches for $list to be an array
Reported by: | nacin | Owned by: | |
---|---|---|---|
Milestone: | 3.1 | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
In 3.0, wp_filter_object_list() returned early if $list was not an array.
Now the call gets passed right to wp_list_filter(), which no longer does the check.
Seen in the wild at http://wordpress.org/support/topic/wordpress-31-rc4-warning-invalid-argument-supplied-for-foreach?replies=3.
Can probably just patch wp_filter_object_list() rather than the new wp_list_filter().
Attachments (2)
Change History (11)
#4
@
14 years ago
I just feel like fixing the regression. No need to hand-hold regarding arrays if wp_list_filter() requires an array.
#5
@
14 years ago
- Severity changed from minor to normal
No, it's not minor. It's a regression that generates errors of E_WARNING.
Note: See
TracTickets for help on using
tickets.
Patch handles the issue higher up the stack, where the check was originally.