Opened 8 years ago
Closed 8 years ago
#33025 closed defect (bug) (fixed)
Invalid argument in class-wp-posts-list-table.php
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | 4.2.2 |
Component: | Posts, Post Types | Keywords: | has-patch commit |
Focuses: | administration | Cc: |
Description
HI,
In the file :
wp-admin/includes/class-wp-posts-list-table.php
there's a variable $post_formats set to :
$post_formats = get_theme_support( 'post-formats' );
and right below it there's a loop which causes Warnings when $post_formats doesn't return array
of arguments but boolean :
foreach ( $post_formats[0] as $format ) {
WP should check if $post_formats is array so we wouldn't end up with Invalid Arguments Supplied warning.
Thanks!
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
33025.diff adds an
is_array()
check consistent with other areas in core.