The MU forums have moved to WordPress.org

Warning: in_array() [function.in-array]: Wrong datatype for second argument (11 posts)

  1. monpelaud
    Member
    Posted 14 years ago #

    I upgrade wordpress Mu 2.7 to 2.7.1 and now I get error messages when I edit a page or a post:
    Warning: in_array() [function.in-array]: Wrong datatype for second argument in \wp-admin\edit-page-form.php on line 350
    Warning: in_array() [function.in-array]: Wrong datatype for second argument in \wp-admin\edit-form-advanced.php on line 463
    Anyone knows how to fixe this issue ?

    Best regards

  2. SteveAtty
    Member
    Posted 14 years ago #

    It's a warning message, not an error and its something to do with the authors associated with the post.

    If you've got php set up correctly then messages like that should be going to a log and not on the screen so they don't get in the way.

  3. monpelaud
    Member
    Posted 14 years ago #

    Thanks for your reply.
    Why before upgrade to 2.7.1 these messages didn't appear ?
    Do you know how I can fixe this issue ?

  4. monpelaud
    Member
    Posted 14 years ago #

    The role of my admin account is set to subscriber.
    When I modify it to Administrator all works fine while I'm stay login. If I logout and login again the role of my admin account is always set to subscriber. I don't understand why I can't set the role of my admin account to Administrator ?

  5. andrea_r
    Moderator
    Posted 14 years ago #

    Is it like this on the main blog? You won't see the admin user listed under any of the other blogs. You should still be able to post though.

  6. Klark123
    Member
    Posted 14 years ago #

    I, too, am seeing similar messages after upgrading from wpmu 2.7 to 2.7.1.

    Specifically, when editing a page, I see:

    Warning: in_array() [function.in-array]: Wrong datatype for second argument in /opt/www/blogs/wp-admin/edit-page-form.php on line 350

    and when editing a post, I see:

    Warning: in_array() [function.in-array]: Wrong datatype for second argument in /opt/www/blogs/wp-admin/edit-form-advanced.php on line 463

    I see these warnings only when I am logged in as the admin account.

    (also, I've suppressed these warnings so they are not shown to the browser. But, it's interesting that they just started showing up now after upgrade to 2.7.1)

  7. monpelaud
    Member
    Posted 14 years ago #

    Klark123,

    Do you use wpmu-ldap ?
    If yes disable wpmu-ldap, set administrator role to admin account.
    Logout and Login, normaly all works fine!

    A new version for wpmu 2.7.1 is avaible at:
    http://sourceforge.net/projects/wpmu-ldap/

  8. mebenson
    Member
    Posted 14 years ago #

    I upgraded to 2.7.1 and I still get that warning. Should upgrading fix that warning?

    I'm not sure what you meant by "set administrator role to admin account". I set admin accounts for a few people already before.

    Thanks.

  9. mebenson
    Member
    Posted 14 years ago #

    I disabled the ldap plugin and re-added the admins to that blog, then enabled the ldap plugin again. It works! Weird since it already said they were already admins.

    If I already upgraded to 2.7.1 should that have happened? Thanks.

  10. plainwise
    Member
    Posted 14 years ago #

    Hi. I faced the same problem after changing my table prefix for the entire Wordpress MU installation.

    All I did was to change the option name each blog option table from wp_1_user_roles to <strong>[your new prefix]</strong>1_user_roles, thus solving the above problem.

    I documented my finding here: http://bit.ly/6oSyr. Hope that helped!

  11. trink79
    Member
    Posted 14 years ago #

    I am just suddenly having this problem. I have not changed any prefixes in the database or added any new plugins.

    Any ideas on how to fix it?

About this Topic

  • Started 14 years ago by monpelaud
  • Latest reply from trink79