[Plugin: OpenID] Missing check for $wp_scripts (4 posts)

  1. Three
    Posted 6 years ago #

    When signed in with an OpenID, the following error was being displayed at the bottom of the post page:

    PHP Fatal error: Call to a member function query() on a non-object in /blog/wp-content/plugins/openid/comments.php on line 182

    There was a missing isset($wp_scripts). The code sample below includes my fix and corrects a typo in your comment :P

     * Print jQuery call for stylizing profile link.
     * @action: comment_form
    function openid_comment_profilelink() {
    	global $wp_scripts;
    	if ((is_single() || is_comments_popup()) && is_user_openid() && isset($wp_scripts) && $wp_scripts->query('openid')) {
    		echo '<script type="text/javascript">stylize_profilelink()</script>';

    Is there perhaps a more serious problem, in that $wp_scripts isn't set?

  2. Three
    Posted 6 years ago #

    Hmm, it seems I was using an older version of the plugin and WordPress wasn't pushing it to me.

    The problem still exists in OpenID v3.1.4, but it is now on line 195, rather than 182.

  3. Will Norris
    Posted 6 years ago #

    kinda strange that this is happening... I can't seem to reproduce it. In any event, I've updated trunk so that it will be in the next release (3.1.5).

  4. Gary Pendergast
    Posted 5 years ago #

    It seems this fix has been reverted at some point. I'm seeing this error in OpenID 3.3.1, it's now on line 239.

    (And the comment typo is back. :p)

Topic Closed

This topic has been closed to new replies.

About this Topic