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