Project

General

Profile

Actions

Bug #10925

closed

PHP: Invalid argument supplied for foreach() in /etc/inc/util.inc on line 2640

Added by Craig Weber over 4 years ago. Updated about 4 years ago.

Status:
Resolved
Priority:
Normal
Category:
Routing
Target version:
Start date:
09/22/2020
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.5.0
Affected Architecture:
All

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

PHP_errors.log (125 Bytes) PHP_errors.log Craig Weber, 09/22/2020 01:39 AM
Actions #1

Updated by Jim Pingle over 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().

Actions #2

Updated by Renato Botelho over 4 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #3

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.

Actions #4

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

Actions

Also available in: Atom PDF