Skip to:
Content
Pages
Categories
Search
Top
Bottom

Warning: array_key_exists() in functions-bb-template.php

  • Hi there i just installed bbpress 1.0-alpha with wordpress 2.7 everything went great untill i started creating useres.

    If you go under admin to the user edit profile page i get this error under user type

    Warning:array_key_exists() [function.array-key-exists]: the second argument should be an array or an object in functions-bb-template.php on line 2021 >Key Master

    Warning:array_key_exists() [function.array-key-exists]: the second argument should be an array or an object in functions-bb-template.php on line 2021 >Administrator

    Warning:array_key_exists() [function.array-key-exists]: the second argument should be an array or an object in functions-bb-template.php on line 2021 >Moderator

    Warning:array_key_exists() [function.array-key-exists]: the second argument should be an array or an object in functions-bb-template.php on line 2021 >Member

    and so on for all user types

    this is what i got from line 2021 in functions-bb-template.php

    <option value=”<?php echo $r; ?>”<?php if ( array_key_exists($r, $user->capabilities) ) echo ‘ selected=”selected”‘; ?>><?php echo $n; ?></option>

    with this error only admin can post comments all other users i guess dont have a type assigned because of this error

    wordpress and bbpress our using the same data base, i can login to wordpress and go to bbpress and still be loged in so i know that part works just something with transferring the user type is not working.

    Any help would be greatly appreciated

Viewing 3 replies - 1 through 3 (of 3 total)
  • So just figurd out that this only happens if a use registers from wordpress, if a user registers from bbpress everything works great in bbpress and wordpress so for now ill just make everyone register through bbpress but this seems to be some coding bug that people might want to check into.


    Sam Bauers
    Participant

    @sambauers

    The warnings are now gone in the latest trunk version. There may be other issues to do with users not receiving roles automatically when they visit the bbPress site.

    I have the same setup, running 2.7 and bbpress alpha 4. About half of my users got roles, half didn’t. And we’re talking about 15,000 plus users with no roles!

    When I create a user in WordPress, the user has no role in bbpress and I get the errors above when trying to edit the user with no role. Even after logging in, there is still no role.

    Hmmm…

    Is there a way I can add the updated files from the latest trunk that you are talking about? I am not technical enough to understand svn.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar