Bug #10961
closedfirewall > schedules display error php
0%
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
Updated by Jim Pingle about 4 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?
Updated by Edivan Carneiro de castro about 4 years ago
my config.xml tag schedule
<schedules>
<schedule></schedule>
</schedules>
Updated by Jim Pingle about 4 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.
Updated by Edivan Carneiro de castro about 4 years ago
which tags should i remove?
Updated by Jim Pingle about 4 years ago
That whole section, or at a minimum, the empty <schedule></schedule>
.
Post on the forum if you have more follow-up questions.