In WP_Posts_List_Table::inline_edit(), check that $post_formats[0] is an array before traversing.

Props DrewAPicture.
Fixes #33025.



git-svn-id: https://develop.svn.wordpress.org/trunk@33667 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2015-08-20 20:18:35 +00:00
parent 98de66207f
commit 695560bf58

View File

@ -1473,13 +1473,13 @@ class WP_Posts_List_Table extends WP_List_Table {
<option value="-1"><?php _e( '&mdash; No Change &mdash;' ); ?></option>
<option value="0"><?php echo get_post_format_string( 'standard' ); ?></option>
<?php
foreach ( $post_formats[0] as $format ) {
?>
<option value="<?php echo esc_attr( $format ); ?>"><?php echo esc_html( get_post_format_string( $format ) ); ?></option>
<?php
if ( is_array( $post_formats[0] ) ) {
foreach ( $post_formats[0] as $format ) {
?>
<option value="<?php echo esc_attr( $format ); ?>"><?php echo esc_html( get_post_format_string( $format ) ); ?></option>
<?php
}
}
?>
</select></label>
<?php