I installed 6.x-2.0-beta7 and 3.0.5 (patched files downloaded from your module page) and all worked just great (1 day)!
But now, in phpBBforum settings page I see this error:
warning: Invalid argument supplied for foreach() in /home2/mysite/public_html/site/includes/form.inc on line 1205.

All working fine, but what this error means and how I can fix it?

Thanks!

Comments

superfedya’s picture

Very strange, I changed this value:
Recent topics word's delimiter: from BR to Space. And error are gone...

dfrechen’s picture

same here. changing the value solved it.

asikuy’s picture

I get the same error, but in the FAQ module | Categories settings:

warning: Invalid argument supplied for foreach() in /home/user/public_html/includes/form.inc on line 1205.

Selecting the "Categorize Questions" got rid of the error.

Thyren’s picture

I got the same error message (actually, it was just a warning and on line 1206) after installing the 6.x-2.0-beta9 version.

I clicked on `save configuration` (even though I didn`t change anything at all) and the message was gone.

cidalan’s picture

same here.. i change
Recent topics word's delimiter: from BR to Space. And error are gone...

Sera’s picture

Version: 6.x-2.0-beta7 » 6.x-2.0-rc2
Assigned: superfedya » Unassigned

This error still seems to be within the code, kinda

warning: Invalid argument supplied for foreach() in [..]/sites/all/modules/phpbbforum/phpbbforum.module on line 1733.

when navigating to the user sites, e.g. [mysite]/user/3 and lots of similar messages

warning: Invalid argument supplied for foreach() in [mysite]/includes/form.inc on line 1213.

when navigating to the phpbbforum configuration page within Drupal: admin/settings/phpbbforum

Changing the "Recent's words delimiter" from BR to Space - and saving this settings - did the trick in the current version of the module, to remove the form.inc error messages.

The "foreach" warning at [mysite]/user/[x] still is there.

Sera’s picture

I could solve this error message
warning: Invalid argument supplied for foreach() in [..]/sites/all/modules/phpbbforum/phpbbforum.module on line 1733.
with a simple if clause. I guess due to some reason (which I have not found out yet), the array og phpbb_group_row was empty... so if it is empty, it's the best way to ignore it, or?

original code (starting at line 1731)

$phpbb_group_id_ary = array();
$phpbb_group_row = phpbb_api_group_memberships(false, $user_id);
  foreach ($phpbb_group_row as $id => $row) {
   $group_id = $row['group_id'];
   $phpbb_group_id_ary[$group_id] = $group_id;
  }

if ($sync == PHPBB_SYNC_TO_PHPBB) {

new code (starting at line 1731)

$phpbb_group_id_ary = array();
$phpbb_group_row = phpbb_api_group_memberships(false, $user_id);
  if (!empty($phpbb_group_row)) {
    foreach ($phpbb_group_row as $id => $row) {
    $group_id = $row['group_id'];
    $phpbb_group_id_ary[$group_id] = $group_id;
    }
  }
if ($sync == PHPBB_SYNC_TO_PHPBB) {
fizk’s picture

Status: Active » Closed (fixed)