Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Warning: Invalid argument supplied for foreach()

    Scheduled Pinned Locked Moved Cache/Proxy
    3 Posts 2 Posters 964 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jabo53
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • BBcan177B
        BBcan177 Moderator
        last edited by

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

        "Experience is something you don't get until just after you need it."

        Website: http://pfBlockerNG.com
        Twitter: @BBcan177  #pfBlockerNG
        Reddit: https://www.reddit.com/r/pfBlockerNG/new/

        1 Reply Last reply Reply Quote 0
        • J
          jabo53
          last edited by

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

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.