Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Fatal Error in openid_comment_profilelink ($wp_scripts is null) #164

Open
GoogleCodeExporter opened this issue Mar 14, 2015 · 0 comments
Open

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Leave comment and validate with openid
2. view page
3. footer breaks

What is the expected output? What do you see instead?

Footer should not break

What version of the product are you using? On what operating system?

Version 3.3.2

Please provide any additional information below.

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

The issue is that $wp_scripts is not set when openid_comment_profilelink is
called (not sure why,  maybe this is always the case with callbacks?).

Simple fix is to add the same check the openid_comment_form has.  Check if
it is set.

        if (comments_open() && is_user_openid() && isset($wp_scripts) &&
$wp_scripts->query('openid')) 

I sould still like to see $wp_scripts get set but at least this avoids the
fatal error.



Original issue reported on code.google.com by tony.pri...@gmail.com on 31 Mar 2010 at 6:01

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant