WordPress.org

Ready to get started?Download WordPress

Forums

Author Avatars List
[resolved] Warning: Array was modified by the user comparison function (5 posts)

  1. Florence
    Member
    Posted 1 year ago #

    Hi, I'm getting this warning and I don't know why. It was working just fine a couple of weeks ago.

    Warning: usort() [function.usort]: Array was modified by the user comparison function in cookingblondes.nl/public_html/wp-content/plugins/author-avatars/lib/UserList.class.php on line 644

    I went to that file but all it says is this on that line. It's not anything I've modified:

    usort($users, array($this, '_user_cmp_postcount'));

    Any ideas? Thanks!

    http://wordpress.org/extend/plugins/author-avatars/

  2. Pbearne
    Member
    Plugin Author

    Posted 1 year ago #

    Hi

    I am sorry I don't know what the problem is here

    usort re-oreders the array this is done with the function _user_cmp_postcount which looks at the number of post and returns the diff

    can you try a different sort and see if that also errors

    Paul

  3. Florence
    Member
    Posted 1 year ago #

    Hello Pbearne, thank you for your response. I have been terribly busy lately, but now I have time to fix this issue. I'm sorry but don't know what you mean by trying a different sort. I did change the stylesheet a little bit.

    -Florence

  4. Pbearne
    Member
    Plugin Author

    Posted 1 year ago #

    I have found that sometimes usort will return an error on some systems so I have changed them in the next version to @usort() which does not return the error

  5. Florence
    Member
    Posted 1 year ago #

    Sweet, thanks! I will be waiting for that update.

    Kind regards,
    -Florence

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic