WordPress.org

Support

Support » Plugins and Hacks » Use Google Libraries » [Resolved] Fix for PHP 5 strict warning

[Resolved] Fix for PHP 5 strict warning

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jason Penney

    @jczorkmid

    This is on the tracker at https://github.com/jpenney/use-google-libraries/issues/1 and I’ve fixed it in the development branch.

    WordPress 3.6 introduced some changes I have yet figure out that triggers some new strict warnings using PHP 5.4+ (see https://github.com/jpenney/use-google-libraries/issues/6 ).

    Hopefully I can fix them all at one. Sorry about the delay.

    Ok, though as noted you can fix it while keeping PHP 4 compatability by switching the constructors around.

    Plugin Author Jason Penney

    @jczorkmid

    Oh, wow.

    I apologize for not reading your post carefully enough, I didn’t catch that.

    I’d have to double check what the final version of WordPress that supported PHP4 was, because I’m not sure it makes sense to put it back, but I do appreciate you bringing it to my attention.

    Thanks!

    On the same topic I notice that line 338 generates strict “Only variables should be passed by reference” errors.

    Assigning wp_remote_head( "http:$url" ) to a variable and then passing that variable as an argument should resolve the issue. For example:

    $remotehead = wp_remote_head( "http:$url" );
    wp_remote_retrieve_response_code( $remote_head )

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Fix for PHP 5 strict warning’ is closed to new replies.
Skip to toolbar