Quote:
Code:
Warning: Invalid argument supplied for foreach() in /admincp/usergroup.php(181) : eval()'d code on line 30
|
It happens only with PHP 5. My workaround (posted in vbhacks-germany, too):
Hook: admin_usergroup_edit
Search for
Code:
foreach ($custom_bbcodes AS $bbcode)
{
print_yes_no_row("[" . strtolower($bbcode) . "]", "abe1_bbcode[non_core][$bbcode]", $abe1_bbcode[non_core][$bbcode]);
}
Replace with
Code:
if ($custom_bbcodes)
{
foreach ($custom_bbcodes AS $bbcode)
{
print_yes_no_row("[" . strtolower($bbcode) . "]", "abe1_bbcode[non_core][$bbcode]", $abe1_bbcode[non_core][$bbcode]);
}
}
Hook: bbcode_parse_start
Search for
Code:
foreach ($abe1_bbcode[non_core] AS $bbcode => $yesno)
{
if ($yesno == 0)
{
unset($this->tag_list['no_option']["$bbcode"]);
unset($this->tag_list['option']["$bbcode"]);
}
}
Replace with
Code:
if ($abe1_bbcode[non_core])
{
foreach ($abe1_bbcode[non_core] AS $bbcode => $yesno)
{
if ($yesno == 0)
{
unset($this->tag_list['no_option']["$bbcode"]);
unset($this->tag_list['option']["$bbcode"]);
}
}
}
Regards, Stoebi