"in_array(): Wrong datatype for second argument" in forum_access.admin.inc on line 839
adamsohn - November 21, 2009 - 16:51
| Project: | Forum Access |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
I had to upgrade to the dev version for some reason that I don't remember. At one point I had a few weeks ago Drupal running with advanced forums. Then I installed phpBB integration module and that fudged the whole system. Now I'm back to using Advanced Forum and things are not as smooth.
* warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/thetrito/public_html/sites/all/modules/forum_access/forum_access.admin.inc on line 839.
* warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/thetrito/public_html/sites/all/modules/forum_access/forum_access.admin.inc on line 839.
#1
What's the URL that produces this error?
#2
Here is the watchdog record. There is also a different problem with the system serving cached pages to logged in users. They might be related.
Type php
Date Saturday, November 21, 2009 - 11:27am
User hgadd@yahoo.com
Location http://www.thetriton.com/user/24048/edit/Author%20Info
Referrer http://www.thetriton.com/user/24048/edit/Address
Message in_array() [function.in-array]: Wrong datatype for second argument in /home/thetrito/public_html/sites/all/modules/forum_access/forum_access.admin.inc on line 839.
Severity error
Hostname 74.233.33.33
Operations
#3
#4
Ah, I see. Try replacing line 836
<?phpif (isset($moderator_rid)) {
?>
with
<?phpif (isset($moderator_rid) && isset($form['account']['roles']['#options'][$moderator_rid])) {
?>
Please let us know if this helps.
What makes you think that this could be related to Forum Access?
#5
Thank you, there is no more error. I haven't test how well the access control works in the forum yet.
My Drupal installation is not respecting user logins ,which, I think, might have something to do with account roles.
#6
Great, thank you for the quick report and test. I've committed the fix to the -dev version, it will show up within 12h.
Please create a new issue if you encounter any other problems.
#7
This did not interfere with normal operation.
#8
Automatically closed -- issue fixed for 2 weeks with no activity.