WordPress.org

Support

Support » How-To and Troubleshooting » Fatal error:Call to a member function query() on a non-object

Fatal error:Call to a member function query() on a non-object

  • Its an email verification link.Upon clicking this link a database updation has to occur but instead an error is aoccuring

    Fatal error: Call to a member function query() on a non-object in /wp-content/themes/bgb/inc/verify.php on line 6

    the code of verify.php :
    ———————————————————
    <?php
    global $wpdb;print_r($wpdb->base_prefix);
    $check=$_REQUEST[“ischeck”];

    $blogname=$_REQUEST[“blogname”];
    $wpdb->query( “UPDATE bloginfo SET isEmailVerified = ‘1’ WHERE blogname= ‘$blogname'”) or die(“error”);
    ?>
    ———————————————-

Viewing 2 replies - 1 through 2 (of 2 total)
  • Is this a plugin, if so can you please verify if the plugin is compatible with your version of WordPress. That would be the step number one.

    Your code has tried to treat something which is not an object
    as if it were, usually something like $not_an_object->method()).

    Is this a new error? has something been updated? It clearly lies within the theme, so has if this is not happening from a new instal of the theme, what has changed?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fatal error:Call to a member function query() on a non-object’ is closed to new replies.
Skip to toolbar