"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
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

salvis - November 21, 2009 - 18:26

What's the URL that produces this error?

#2

adamsohn - November 21, 2009 - 19:09

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

adamsohn - November 21, 2009 - 19:11
Title:On trying to reregistar forum access throws this error message.» On trying to registrar forum access throws this error message.

#4

salvis - November 21, 2009 - 20:13

Ah, I see. Try replacing line 836

<?php
 
if (isset($moderator_rid)) {
?>

with

<?php
 
if (isset($moderator_rid) && isset($form['account']['roles']['#options'][$moderator_rid])) {
?>

Please let us know if this helps.

There is also a different problem with the system serving cached pages to logged in users.

What makes you think that this could be related to Forum Access?

#5

adamsohn - November 21, 2009 - 20:49

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

salvis - November 21, 2009 - 23:16
Title:On trying to registrar forum access throws this error message.» "in_array(): Wrong datatype for second argument" in forum_access.admin.inc on line 839
Status:active» fixed

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

salvis - November 22, 2009 - 13:38
Priority:critical» normal

This did not interfere with normal operation.

#8

System Message - December 6, 2009 - 13:40
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.