Home Forums BP Better Messages null given bp-better-messages-websocket/inc/premium.php on line 819

Tagged: , ,

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #12613
    Terry
    Participant

    PHP Warning: foreach() argument must be of type array|object, null given bp-better-messages-websocket/inc/premium.php on line 819

    I’m getting this on my server’s errorlog. PHP is 8.0 Suggestions for a fix?

    Thanks!

    #12614
    Support
    Keymaster

    Hi there!

    Will check that, but I think it not causing any issue besides warning entry in your PHP erros log.

    Thanks!

    #12615
    Terry
    Participant

    That was quick! No it doesn’t seem to be. Is it just a PHP version thing?

    line 819 is the code for online users:
    819: foreach( $online_tabs as $user_id => $online_tabs ){
    820: $online_users[ $user_id ] = $user_id;
    821: }

    It is taking up a considerable portion of my log though.

    • This reply was modified 2 years, 5 months ago by Terry.
    #12617
    Support
    Keymaster

    Hi there!

    Its more related to your PHP configuration of your error level log.
    Sometimes it can spam the log with no reason. But I will check if I can fix something there to avoid that warning.

    Thanks!

    #12618
    Terry
    Participant

    Thank you!

    Absolutely fantastic Plugin!

    #12619
    Support
    Keymaster

    Thanks for your feedback!

    I just wrapped that piece of code to additional check to avoid that PHP warning.
    In next update it should be fixed. (not sure now which day exactly it will be released)

    Thanks!

    #12620
    Terry
    Participant

    ok great! Much appreciated!

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.