Warning: Invalid argument supplied for foreach()



  • Warning: Invalid argument supplied for foreach() in /usr/local/www/pkg_edit.php on line 579

    does anyone know the fix for this error?

    Jabo


  • Moderator

    pkg_edit.php is used in several places, you will need to provide more details to see what the issue is.



  • @BBcan177:

    pkg_edit.php is used in several places, you will need to provide more details to see what the issue is.

    When I try to use the group acl as pictured

    As you can see it displays the warning and error message and the drop down is empty.
    I looked at the file and it looks like this:


    576 - $size = ($pkga['size'] ? " size='{$pkga['size']}' " : "");
    577 - $onchange = (isset($pkga['onchange']) ? "onchange="{$pkga['onchange']}"" : '');
    578 - $input = "<select id="" . $pkga[" fieldname']="" .="" "'="" $multiple="" $size="" $onchange="" name="&quot;$fieldname&quot;">\n";579 - foreach ($pkga['options']['option'] as $opt) {580 - $selected = (in_array($opt['value'], $items) ? 'selected="selected"' : '');581 - $input .= "\t<option value="&quot;{$opt['value']}&quot;" {$selected}="">{$opt['name']}</option>\n";582 - }But of course I have no idea what the error is.ThanksJabo</select>


Log in to reply