Project

General

Profile

Actions

Bug #10961

closed

firewall > schedules display error php

Added by Edivan Carneiro de castro over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Rules / NAT
Target version:
-
Start date:
10/06/2020
Due date:
% Done:

0%

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

Description

Current Base System: 2.5.0.a.20201006.0650

On open firewall -> schedules display the follow message:

Warning: Invalid argument supplied for foreach() in /usr/local/www/firewall_schedule.php on line 114

Actions #1

Updated by Jim Pingle over 3 years ago

  • Category set to Rules / NAT
  • Status changed from New to Feedback

I checked a couple systems, one with and one without schedule entries, and neither one had an error on that page.

The code on that page hasn't been touched in months, so it's unlikely to be a recent change. Also no code changes for the variable on the line in question.

Something may be amiss in your configuration causing it.

The line in question is:

foreach ($schedule['timerange'] as $timerange) {

We could add some validation before running that, but it's not clear that a user could ever land in that state naturally (e.g. without manually editing the configuration).

Can you provide the contents of the schedule configuration in your config.xml?

Actions #2

Updated by Edivan Carneiro de castro over 3 years ago

my config.xml tag schedule

<schedules>
<schedule></schedule>
</schedules>

Actions #3

Updated by Jim Pingle over 3 years ago

  • Status changed from Feedback to Closed

I am unsure how your configuration ended up in that state, but you can take a backup, remove the offending tags from the configuration and restore, then it should work properly.

Unless this is happening to a lot more people I don't see the need to correct it in the code since that is an unusual state for the configuration to be in.

Actions #4

Updated by Edivan Carneiro de castro over 3 years ago

which tags should i remove?

Actions #5

Updated by Jim Pingle over 3 years ago

That whole section, or at a minimum, the empty <schedule></schedule>.

Post on the forum if you have more follow-up questions.

Actions #6

Updated by Edivan Carneiro de castro over 3 years ago

its worked

Actions

Also available in: Atom PDF