WordPress.org

Ready to get started?Download WordPress

Forums

Popularity Contest
[resolved] PHP Fatal error (6 posts)

  1. dancriel
    Member
    Posted 3 years ago #

    Hi,

    It looks like popularity contest stopped working for me and I see the following PHP error in my logs.

    HP Fatal error: Call to a member function create_post_record() on a non-object in /<webserver path>/wp-content/plugins/popularity-contest/popularity-contest.php on line 2149

    Using Popularity Contest Version 2.0b2

    Anyone else have this problem?

  2. dancriel
    Member
    Posted 3 years ago #

    That's supposed to be "PHP Fatal Error", not "HP".

    It looks like the problem might be that the global $akpc variable is false when akpc_publish() gets called.

    Thanks in advance for anyone who can help.

  3. jproducer
    Member
    Posted 3 years ago #

    This fix handled all my errors Patched Plugin

  4. dancriel
    Member
    Posted 3 years ago #

    Appreciate the reply jproducer, that link goes to a patch for an old version of popularity contest designed for WordPress 2.5 though...the PHP Fatal Error fix discussed in that article does not apply to the latest version of PC.

    I made an attempt to fix this error on my own by changing line 2149 from this:

    $akpc->create_post_record($post_id);

    To this:

    if ($akpc) $akpc->create_post_record($post_id);

  5. dancriel
    Member
    Posted 3 years ago #

    Will mark this thread as resolved if this works.

  6. dancriel
    Member
    Posted 3 years ago #

    the above fix eliminates the error.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic