Bug #10925
closedPHP: Invalid argument supplied for foreach() in /etc/inc/util.inc on line 2640
100%
Description
Invalid argument supplied for foreach() in /etc/inc/util.inc on line 2640 error at boot.
Has started happening about 1 week ago (I update nightly to the latest snapshots). This is on an SG-5100 but I do not see this option under "Affected Architecture" in the dropdown for creating an issue.
Files
Updated by Jim Pingle about 4 years ago
- Category set to Routing
- Assignee set to Renato Botelho
- Target version set to 2.5.0
- Affected Version changed from 2.5.x to 2.5.0
That's line 2640 on factory and line 2624 on CE.
The foreach() here:
$rtable = route_table();
$result = array();
foreach ($rtable[$family] as $item) {
if ($item['destination'] == $target) {
$result[] = $item;
}
}
$rtable
is always an array coming out of route_table()
but it could be empty, so needs a validity test before foreach()
.
Updated by Renato Botelho about 4 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied in changeset ffe95182999a344dd926c5079a3f74ccc62e0f46.
Updated by Craig Weber about 4 years ago
Renato Botelho wrote:
Applied in changeset ffe95182999a344dd926c5079a3f74ccc62e0f46.
Great, thank you! If the status is Feedback I assume this has not yet been pushed to the regular snapshots? I've just done the most recent snapshot update and the error did not occur (yet) however it seems to be somewhat random.
Updated by Renato Botelho about 4 years ago
- Status changed from Feedback to Resolved
Craig Weber wrote:
Renato Botelho wrote:
Applied in changeset ffe95182999a344dd926c5079a3f74ccc62e0f46.
Great, thank you! If the status is Feedback I assume this has not yet been pushed to the regular snapshots? I've just done the most recent snapshot update and the error did not occur (yet) however it seems to be somewhat random.
It's on recent snapshots. Ticket is in feedback state so we can hear from you if the fix worked. Based on what you said I understand it did so I'm closing the ticket.
If you see the problem yet please let us know and ticket can be re-opened. Thanks