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

salvis - September 16, 2009 - 00:06
Category:support request» bug report

Hmm, I'm not sure why this happens for you, but try replacing the line 284

<?php
 
if (!forum_access_access($variables['tid'], 'create')) {
?>

with

<?php
 
if (!forum_access_access($variables['tid'], 'create') && !empty($variables['links'])) {
?>

#2

Fayna - September 19, 2009 - 04:38

Yay! That worked. :-) Thanks so much!!

#3

salvis - September 19, 2009 - 14:20
Title:Invalid argument supplied error» Invalid argument supplied supplied for foreach(), line 285
Status:active» fixed

Great, thanks for letting us know.

Committed to the -dev version.

#4

System Message - October 3, 2009 - 14:30
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.