Skip to content

Commit

Permalink
Cast width and height to int in WP_oEmbed:fetch() so we don't have to…
Browse files Browse the repository at this point in the history
… rely on providers.

git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@18019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
ryan committed May 24, 2011
1 parent 4c0827a commit 5fdbe93
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wp-includes/class-oembed.php
Expand Up @@ -165,8 +165,8 @@ function discover( $url ) {
function fetch( $provider, $url, $args = '' ) {
$args = wp_parse_args( $args, wp_embed_defaults() );

$provider = add_query_arg( 'maxwidth', $args['width'], $provider );
$provider = add_query_arg( 'maxheight', $args['height'], $provider );
$provider = add_query_arg( 'maxwidth', (int) $args['width'], $provider );
$provider = add_query_arg( 'maxheight', (int) $args['height'], $provider );
$provider = add_query_arg( 'url', urlencode($url), $provider );

foreach( array( 'json', 'xml' ) as $format ) {
Expand Down

0 comments on commit 5fdbe93

Please sign in to comment.