Skip to:
Content
Pages
Categories
Search
Top
Bottom

“BBP_Converter_DB does not have a method “__destruct””


  • Hammy Havoc
    Participant

    @hammyhavoc

    Hi,

    I’m receiving this error 1-2 times per day like clockwork:

    Current plugin: bbPress (version 2.6.9)
    PHP version 8.1.6
    Error Details
    =============
    An error of type E_ERROR was caused in line 33 of the file /home/site/public_html/wp-content/plugins/bbpress/includes/admin/classes/class-bbp-converter-db.php. Error message: Uncaught TypeError: register_shutdown_function(): Argument #1 ($callback) must be a valid callback, class BBP_Converter_DB does not have a method "__destruct" in /home/site/public_html/wp-content/plugins/bbpress/includes/admin/classes/class-bbp-converter-db.php:33
    Stack trace:
    #0 /home/site/public_html/wp-content/plugins/bbpress/includes/admin/classes/class-bbp-converter-db.php(33): register_shutdown_function(Array)
    #1 /home/site/public_html/wp-content/plugins/bbpress/includes/admin/classes/class-bbp-converter-base.php(150): BBP_Converter_DB->__construct('site_db', '&9Ah58fa', 'site_db', 'localhost')
    #2 /home/site/public_html/wp-content/plugins/bbpress/includes/admin/classes/class-bbp-converter-base.php(104): BBP_Converter_Base->init()
    #3 /home/site/public_html/wp-content/plugins/bbpress/includes/admin/converters/phpBB.php(24): BBP_Converter_Base->__construct()
    #4 /home/site/public_html/wp-content/plugins/bbpress/includes/admin/tools/converter.php(94): phpBB->__construct()
    #5 /home/site/public_html/wp-content/plugins/bbpress/includes/users/functions.php(982): bbp_new_converter('phpBB')
    #6 /home/site/public_html/wp-includes/class-wp-hook.php(307): bbp_user_maybe_convert_pass('')
    #7 /home/site/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array)
    #8 /home/site/public_html/wp-includes/plugin.php(474): WP_Hook->do_action(Array)
    #9 /home/site/public_html/wp-content/plugins/bbpress/includes/core/sub-actions.php(265): do_action('bbp_login_form_...')
    #10 /home/site/public_html/wp-includes/class-wp-hook.php(307): bbp_login_form_login('')
    #11 /home/site/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array)
    #12 /home/site/public_html/wp-includes/plugin.php(474): WP_Hook->do_action(Array)
    #13 /home/site/public_html/wp-login.php(518): do_action('login_form_logi...')
    #14
    thrown
Viewing 8 replies - 1 through 8 (of 8 total)

  • Robin W
    Moderator

    @robin-w

    ok, not entirely sure why a convertor is running. Is there some specific action you are doing to get this ?


    Hammy Havoc
    Participant

    @hammyhavoc

    Hi Robin!

    Thank you very much for the reply, really appreciate it. :- )

    Around two years ago, I migrated from phpBB to bbPress, and it works great, just get this error via email (via Jetpack) 1-2 times per day around the same time each day. There shouldn’t be any kind of conversion going on anymore. Once migrated, you don’t need it anymore, right? Is there any way to disable it from running?


    Robin W
    Moderator

    @robin-w

    ok, I think this is jetpack doing checks in the background.

    I’d guess that php 8.1.6 does not like that the destruct function has not been defined, older versions are probably happy with that, each newer version of php seems to get less tolerant, and plugin authors spend their lives fighting a stricter and stricter php regime 🙂


    malachite
    Participant

    @malachite

    I started getting this error after I upgraded to PHP 8.1. It prevents login, so this is a problematic error. BBPress is trying to setup a new login object and in the process wants to destroy any existing login object. Because BBPress doesn’t actually have a __destruct method php8.1 throws an error. I commented out that block of code and everything seems to work correctly. Of course that is a temporary fix that will be overwritten as soon as the plugin is updated.

    I don’t have Jetpack installed on this server so it is not the culprit.


    Robin W
    Moderator

    @robin-w

    so just for clarity, what lines of what file did you comment out?


    malachite
    Participant

    @malachite

    /wp-content/plugins/bbpress/includes/admin/classes/class-bbp-converter-db.php

    I commented out lines 33-37:

    // register_shutdown_function( array( $this, '__destruct' ) );
    // 
    // if ( WP_DEBUG && WP_DEBUG_DISPLAY ) {
    //    $this->show_errors();
    // }

    Robin W
    Moderator

    @robin-w

    Thanks for posting – should help someone else coming along later.

    I’ve posted a trac ticket

    https://bbpress.trac.wordpress.org/ticket/3508#ticket


    malachite
    Participant

    @malachite

    Thanks, Robin!

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Skip to toolbar