using drupal 6, and every thing is up to current version.

Here is the log: (have dozens of these same errors)

Type php
Date Saturday, April 17, 2010 - 19:31
User Ireful
Location http://floridafurs.com/user/57/edit
Referrer http://floridafurs.com/user/57
Message in_array() [function.in-array]: Wrong datatype for second argument in /www/floridafurs.com/htdocs/sites/all/modules/forum_access/forum_access.admin.inc on line 860.
Severity error
Hostname 70.121.248.41
Operations

Comments

Yappyfox’s picture

Version: 6.x-1.3 » 6.x-1.x-dev

I also just upgraded to -dev on this module.. And problem still exists. (Thought I would try it to rule it out)

Lapaj’s picture

I can confirm this on my site: http://androidportal.hu
Drupal 6.14

salvis’s picture

Status: Active » Postponed (maintainer needs more info)

I'm puzzled by your report. $form['account']['roles']['#default_value'] is an array containing the rids of the roles that the user has, and he always has at least the 'authenticated user' role, so it's always at least array(2).

When you use user 1 to look at the offending user's profile page, don't you see a list of roles with at least the 'authenticated user' role checked (and disabled)?

Yappyfox’s picture

Yes they do show up.. "Authenticated User" is selected and unable to be edited,
Forum Moderator is unselected and unable to be edited
and "Anonymous User" is there as well, and is able to be checked, but is defaulted off.

These are the only roles that appear.

Yappyfox’s picture

lemme try to give you a lil more info.. here is a DB dump of "roles"

SQL query: SELECT * FROM `role` LIMIT 0, 30 ;
Rows: 3
rid name
1 anonymous user
2 authenticated user
4 Forum Moderator

Dunno what other db dumps would be of any further assistance.

salvis’s picture

What? Anonymous is there???

Are we not talking about the user/UID/edit page? Anonymous should not appear on that page!

If you see Anonymous, then you must be using a third-party module that messes with that page.

Yappyfox’s picture

yes anonymous is there.. don't know which module would do that.. Here is a list of modules I have that -might- have bearing?

accountmenu, acl, advanced_forum, advanced_help, advanced_profile, author_pane, birthdays, calendar, calendar_block, captcha, cck, ctools,
date, ed_classified, embed_gmap, forum_access, jqp, jquery_plugin, jquery_ui, jstools, jump, ljxp, mailman_manager,
menu_admin_per_menu, menu_node, menu_node_edit, menu_node_views, mibbit_irc, mobile_tools, node_permissions_grid, panels, profile_permission,
rotor, rules, signup, site_user_list, spamspan, taxonomy_access, token, upload_element, user_mailman_register,
userloginbar, views, wysiwyg

salvis’s picture

Anonymous is the opposite of authenticated. Being able to assign the 'anonymous user' role to an (authenticated) user is nuts. Core doesn't offer that.

Whichever module is doing that is probably responsible for trashing $form['account']['roles']['#default_value'], too.

Yappyfox’s picture

So is this line 860 only responsible for throwing the "forum access" check box on the user edit page, and harmless to any other functions of the module? ie all the access information is getting written out?

Is there a way to trap the anonymous rid from that function, so it won't throw the php errors?

salvis’s picture

I don't think it's the anonymous rid per se that causes the errors, but the showing up of Anonymous proves that someone is messing with those checkboxes in a reckless and uninformed way.

As long as we can't either reproduce the problem on a site with nothing but FA (and ACL) or identify the offending module, there's nothing we can do.

Yappyfox’s picture

"mobile tools" is the culprit. I'm going to open a bug report there referring back to this thread.

Lapaj’s picture

Status: Postponed (maintainer needs more info) » Active

This is the list of modules i'm using too (picked from comment #7): acl, advanced_forum, author_pane, captcha, cck, mobile_tools, token, views, wysiwyg

These can possibly cause the problem.

Yappyfox’s picture

Disable mobile_tools.. I suspect the php error will go away..

salvis’s picture

Status: Active » Postponed (maintainer needs more info)

Please test the -dev version of mobile_tools, see #778738: $form['account']['roles']['#default_value'] Gets messed up..

Yappyfox’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Yes! everything seems to be happy now.. Thanks so much for spending the time on the issue, even tho it was not your module at fault!

salvis’s picture

Category: bug » support
Status: Closed (fixed) » Fixed

Great, thanks for letting us know.

Please set issues to fixed rather than closed, so that everyone who's following them (including the maintainer) sees the status change.

Closing an issue immediately removes it from the radar screen.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.