Community

Connecting WordPress People

null given bp-better-messages-websocket/inc/premium.php on line 819

TTerry 6 replies 0 views 2 readers

  1. New
    #1

    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!

    More reactions: press the Down arrow
    views
  2. New
    Admin
    #2

    Hi there!

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

    Thanks!

    More reactions: press the Down arrow
  3. New
    #3

    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.

    More reactions: press the Down arrow
  4. New
    Admin
    #4

    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!

    More reactions: press the Down arrow
  5. New
    #5

    Thank you!

    Absolutely fantastic Plugin!

    More reactions: press the Down arrow
  6. New
    Admin
    #6

    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!

    More reactions: press the Down arrow
  7. New
    #7

    ok great! Much appreciated!

    More reactions: press the Down arrow