Embeds: Ensure embed widths are integers.

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

See #36435.



git-svn-id: https://develop.svn.wordpress.org/trunk@37549 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast 2016-05-24 06:14:19 +00:00
parent 01356e100e
commit 5de41748d3
1 changed files with 2 additions and 1 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;