Embeds: Ensure embed widths are integers.

This prevents a warning in PHP trunk when a non-integer width is passed.

See #36435.


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


git-svn-id: http://core.svn.wordpress.org/trunk@37517 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast 2016-05-24 06:15:28 +00:00
parent 2441b7b52f
commit 733ccfe08a
2 changed files with 3 additions and 2 deletions

View File

@ -523,7 +523,8 @@ JS;
* @return array|false Response data on success, false if post doesn't exist. * @return array|false Response data on success, false if post doesn't exist.
*/ */
function get_oembed_response_data( $post, $width ) { function get_oembed_response_data( $post, $width ) {
$post = get_post( $post ); $post = get_post( $post );
$width = absint( $width );
if ( ! $post ) { if ( ! $post ) {
return false; return false;

View File

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