Project

General

Profile

Actions

Bug #2284

closed

rc.newwanip handle case when gifs config is null

Added by Phillip Davis about 13 years ago. Updated about 13 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
03/13/2012
Due date:
% Done:

0%

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

Description

If the 'gifs' section of the config is null, then /etc/rc.newwanip logs errors when trying to process the 'gifs' array.

/* Check Gif tunnels */
if($config['gifs']['gif'] != ""){
foreach($config['gifs']['gif'] as $gif) {

The extra "if" statement (middle line above) and a matching "}" further down handles this null case, so that no error is logged in /tmp/PHP_errors.txt

A corrected file is attached.
I think this is new code in 2.1, so othe fix only applies to 2.1


Files

rc.newwanip (5.78 KB) rc.newwanip rc.newwanip corrected to handle null 'gifs' config Phillip Davis, 03/13/2012 08:05 AM
Actions

Also available in: Atom PDF