Invalid argument supplied supplied for foreach(), line 285
Fayna - September 15, 2009 - 23:26
| Project: | Forum Access |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Hello. An error keeps popping up for my users, not on my account though (user #1).
warning: Invalid argument supplied for foreach() in /../sites/all/modules/forum_access-6.x-1.x-dev/forum_access/forum_access.module on line 285.
I originally had 6.x-1.0 but thought upgrading to the dev version might fix this. What could this be caused by?

#1
Hmm, I'm not sure why this happens for you, but try replacing the line 284
<?phpif (!forum_access_access($variables['tid'], 'create')) {
?>
with
<?phpif (!forum_access_access($variables['tid'], 'create') && !empty($variables['links'])) {
?>
#2
Yay! That worked. :-) Thanks so much!!
#3
Great, thanks for letting us know.
Committed to the -dev version.
#4
Automatically closed -- issue fixed for 2 weeks with no activity.