Skip to:
Content
Pages
Categories
Search
Top
Bottom

Warning: array_reverse() [function.array-reverse]: The argument should be an arr

  • @geordee

    Participant

    I am getting this error when I access my Inbox.

    Warning: array_reverse() [function.array-reverse]: The argument should be an array in /home/site/public_html/wp-content/mu-plugins/bp-messages/bp-messages-classes.php on line 61

    Warning: Invalid argument supplied for foreach() in /home/site/public_html/wp-content/mu-plugins/bp-messages/bp-messages-classes.php on line 63

    Warning: array_reverse() [function.array-reverse]: The argument should be an array in /home/site/public_html/wp-content/mu-plugins/bp-messages/bp-messages-classes.php on line 80

    What’s more interesting is that it says I have two unread messages in my Inbox (there is a 2 next to my inbox), even when I selected all messages and deleted. Is there something that went wrong in the database and how?

Viewing 16 replies - 1 through 16 (of 16 total)
  • @geordee

    Participant

    Got it resolved by setting unread_count to 0 and is_deleted to 1 for all my messages through PHPMyAdmin. Wonder how it got corrupted.

    @burtadsit

    Participant

    I posted a ticket in trac about this for you.

    @kevinryman

    Participant

    I’m having the same issue. One of my users sent me the following:


    I couldn’t see your last message, when I go to my messages list it shows one message from Shinbo, but instead of your message I see these errors:

    Warning: array_reverse() [function.array-reverse]: The argument should be an array in /home/*****/public_html/beta/wp-content/mu-plugins/bp-messages/bp-messages-classes.php on line 61

    Warning: Invalid argument supplied for foreach() in /home/*****/public_html/beta/wp-content/mu-plugins/bp-messages/bp-messages-classes.php on line 63

    Warning: array_reverse() [function.array-reverse]: The argument should be an array in /home/*****/public_html/beta/wp-content/mu-plugins/bp-messages/bp-messages-classes.php on line 80

    It also doesn’t show your message.


    @apeatling

    Keymaster

    This is probably due to a bug where threads that get to a certain length cause problems in the DB. It was actually the field type for the field that stores message IDs. Long story short, if you update to beta 2, and try with new message threads, you should see the problem go away.

    @kevinryman

    Participant

    Thank you for your reply! Is the beta 2 is “BuddyPress Combo Download” or the files found at https://svn.buddypress.org/trunk ?

    @burtadsit

    Participant

    It’s the combo download for the whole beta 2 package.

    @geordee

    Participant

    In fact there was another bug which went away when I upgraded to beta 2. I guess the bug was with pagination. I was not able to see the last page in any of the paged lists. Now it’s fine.

    @apeatling

    Keymaster

    @geordee: Glad to hear it. There were in fact around 140-150 bugs fixed between beta 1 and beta 2.

    @geordee

    Participant

    @burtadsit what’s the ticket number? The problem persists. Would like to know whether it is fixed, if not I would like to look into that.

    @kevinryman

    Participant

    I upgraded to BuddyPress B2 but the errors still persist. Any tips? Thanks in advance!

    @geordee

    Participant

    By the way, I have this error persisting. It’s not for everyone. Its coming randomly to some users. I could have fixed it, if only I can detect a pattern!!! Will spend sometime this evening.

    @kevinryman

    Participant

    Yes, same here. I upgraded both my BuddyPress and WordPress to the latest versions but error still persists.

    @geordee

    Participant

    Try this work-around, if you can explain it to your users. Set the unread_count to 0 in the table wp_bp_messages_recipients for all messages. I see this issue going away by doing that!

    @geordee

    Participant

    And hopefully you will have to do it only once. Upgrade your installation to RC1 too.

    @apeatling

    Keymaster

    This is caused by a bug in the pervious betas. It is a database problem and has nothing to do with the code.

    @kevinryman

    Participant

    @geordee

    “unread_count” is already set to “0”. Thanks in advance!

Viewing 16 replies - 1 through 16 (of 16 total)
  • The topic ‘Warning: array_reverse() [function.array-reverse]: The argument should be an arr’ is closed to new replies.
Skip to toolbar