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

Props DrewAPicture.
Fixes #33025.


Built from https://develop.svn.wordpress.org/trunk@33667


git-svn-id: http://core.svn.wordpress.org/trunk@33634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-08-20 20:19:25 +00:00
parent 4694c477d3
commit 4254f22c2d
2 changed files with 7 additions and 7 deletions

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

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-alpha-33666';
$wp_version = '4.4-alpha-33667';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.