• Resolved purityboy83

    (@purityboy83)


    hi

    I applied php 8.0 and wordpress 5.6.1.
    An error occurs as shown below.

    Warning: Attempt to read property “post_status” on null in /websource/wp-content/plugins/bbp-style-pack/includes/functions.php on line 2476

    Urgently ask for help.

    Best Regards,
    Hyunho

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter purityboy83

    (@purityboy83)

    2476 line is

            //now we need to check if the topic has been trashed by author
            if (!empty ($login_check) && $post->post_status == 'trash' && $post->post_author == get_current_user_id() ) {
                    $topic_id =  $post->ID;
                    //then redirect to the forum we came from
                    $forum = bbp_get_forum_permalink (bbp_get_topic_forum_id (  $topic_id )) ;
                    wp_redirect ($forum) ;
                    exit ;
            }
    
    Plugin Author Robin W

    (@robin-w)

    ok, is this happening on the site loading – ie it won’t load, or just to logged in users, or all site visitors, and all the time or just when doing something ?

    Thread Starter purityboy83

    (@purityboy83)

    Occurs when trying to read an topic written after an upgrade
    (all users)

    There is no problem with existing written topics

    • This reply was modified 4 years, 1 month ago by purityboy83.
    Plugin Author Robin W

    (@robin-w)

    just logged in or all users?

    Thread Starter purityboy83

    (@purityboy83)

    All users (both login or non login)

    Plugin Author Robin W

    (@robin-w)

    ok if it is a major problem, for the moment switch off the ability for users to trash topics

    dashboard>settings>bbp style pack>Topic/Reply Display

    item 18

    that should take away the error whilst I work out how to fix it

    Thread Starter purityboy83

    (@purityboy83)

    hi

    disable 2 feature(check -> uncheck)

    – Allow Participants to trash their own topics
    – Allow Participants to trash their own replies

    but problem continues….
    Do you ever need to empty the trash?

    Plugin Author Robin W

    (@robin-w)

    hmmm…

    ok, I’d suggest you revert to php 7.4 and confirm that this fixes please

    Thread Starter purityboy83

    (@purityboy83)

    Hi

    First of all, thank you for the quick response and help.

    change to PHP 7.4 and i will wait for the fix.

    Thank you

    Best Regards,
    Hyunho

    Plugin Author Robin W

    (@robin-w)

    can you just confirm that 7.4 makes it ok again?

    Thread Starter purityboy83

    (@purityboy83)

    Hi

    Back to PHP7.4
    I have confirmed that there are no problems.

    It is normal, no problem

    Best Regards,
    Hyunho

    Plugin Author Robin W

    (@robin-w)

    should be fixed in 4.8.0 just released

    Thread Starter purityboy83

    (@purityboy83)

    Hi
    @robin-w

    Thanks for the quick help.

    Best Regards,
    Hyunho

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘urgent – functions.php on line 2476’ is closed to new replies.