Support » Fixing WordPress » WP_OEmbed: Only variables should be passed by reference

  • I’m getting this strict warning: “Only variables should be passed by reference” and it’s being triggered in: wp-includes/class-oembed.php, line 135 which is:

    if ( $html = wp_remote_retrieve_body( wp_safe_remote_get( $url ) ) ) {

    The value for $url is a string, and has nowhere been passed by reference.

    I’ve looked at other forum posts with this message, but none have applied to WP_OEmbed, that I’ve found.

Viewing 1 replies (of 1 total)
  • Same strict standards warning on my case!
    Strict Standards: Only variables should be passed by reference in class-oembed.php on line 135
    I am using the WP_oEmbed() class like in the example below:

    $video_link = 'http://www.hulu.com/watch/585278';
    $oembed = new WP_oEmbed();
    $provider = $oembed->discover( $video_link );
    $data = $oembed->fetch( $provider, $video_link );
    var_dump($data);

    P.S.: Hulu doesn’t work like this or maybe because I am in Europe. All other providers work just fine.

Viewing 1 replies (of 1 total)
  • The topic ‘WP_OEmbed: Only variables should be passed by reference’ is closed to new replies.