Support » Plugin: WP Visitor Statistics (Real Time Traffic) » Uncaught Error: Call to a member function prepare() on null in …wsm_db.php:340

  • Resolved Tyler Tork

    (@tylertork)


    Got email from my hosting provider:

    WordPress version 5.4.2
    Current theme: Graphene (version 2.7.6)
    Current plugin: WP Visitor Statistics (version 3.4)
    PHP version 7.3.16

    Error Details
    =============
    An error of type E_ERROR was caused in line 340 of the file /home/tylertor/public_html/jpb/wp-content/plugins/wp-stats-manager/includes/wsm_db.php. Error message: Uncaught Error: Call to a member function prepare() on null in /home/tylertor/public_html/jpb/wp-content/plugins/wp-stats-manager/includes/wsm_db.php:340
    Stack trace:
    #0 /home/tylertor/public_html/jpb/wp-content/plugins/wp-stats-manager/includes/wsm_db.php(2139): wsmDatabase->fnGetToolBarID(‘jonathanpopkesb…’)
    #1 /home/tylertor/public_html/jpb/wp-content/plugins/wp-stats-manager/includes/wsm_init.php(423): wsmDatabase->fnCorrectDatabaseTables()
    #2 /home/tylertor/public_html/jpb/wp-includes/class-wp-hook.php(287): wsmInitPlugin::wsm_plugin_init(”)
    #3 /home/tylertor/public_html/jpb/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
    #4 /home/tylertor/public_html/jpb/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
    #5 /home/tylertor/public_html/jpb/wp-settings.php(540): do_action(‘init’)
    #6 /home/tylertor/public_html/jpb/wp-config.php(96): require_once(‘/home/tylertor/…’)
    #7 /home/tylertor/public_html/jpb/wp-load.php(37): require_once(‘/home/tylertor/…’)
    #8 /home/tylertor/public_

    If you search Google with this query, you’ll find many sites experiencing this problem.
    wp-stats-manager “Call to a member function prepare”

Viewing 3 replies - 1 through 3 (of 3 total)
  • rudybrinkman

    (@rudybrinkman)

    Same error on one of the websites I maintain. (domain removed in error message). Appeared for no reason so it seems, since no updates were done over the last few days. All plugins are up to date.

    WordPress version 5.4.2
    Current theme: Make (version 1.9.28)
    Current plugin: WP Visitor Statistics (version 3.4)
    PHP version 7.2.31

    Error Details
    =============
    An error of type E_ERROR was caused in line 340 of the file /home/srbbcom/domains/————-.com/public_html/wp-content/plugins/wp-stats-manager/includes/wsm_db.php. Error message: Uncaught Error: Call to a member function prepare() on null in /home/srbbcom/domains/————-.com/public_html/wp-content/plugins/wp-stats-manager/includes/wsm_db.php:340

    #0 /home/srbbcom/domains/————-.com/public_html/wp-content/plugins/wp-stats-manager/includes/wsm_db.php(2139): wsmDatabase->fnGetToolBarID(‘solidrockbluesb…’)
    #1 /home/srbbcom/domains/————-.com/public_html/wp-content/plugins/wp-stats-manager/includes/wsm_init.php(423): wsmDatabase->fnCorrectDatabaseTables()
    #2 /home/srbbcom/domains/————-.com/public_html/wp-includes/class-wp-hook.php(287): wsmInitPlugin::wsm_plugin_init(”)
    #3 /home/srbbcom/domains/————-.com/public_html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
    #4 /home/srbbcom/domains/————-.com/public_html/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
    #5 /home/srbbcom/domains/————-.com/public_html/wp-settings.php(540): do_action(‘init’)
    #6 /home/srbbcom/

    Plugin Author osama.esh

    (@osamaesh)

    hello @rudybrinkman & @tylertork ,
    thank you for this report,
    we will push a new update within the next few hours to fix this bug

    Best

    Plugin Author osama.esh

    (@osamaesh)

    @rudybrinkman @tylertork

    kindly update and check again

    Thank you again

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Uncaught Error: Call to a member function prepare() on null in …wsm_db.php:340’ is closed to new replies.