mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Ticket #975. Properly initialize variables to avoid caching issues. Also check an array exists before trying to foreach to avoid errors.
This commit is contained in:
parent
a8200dbfe7
commit
f48b620546
@ -49,11 +49,14 @@ require_once("interfaces.inc");
|
||||
*/
|
||||
function backup_vip_config_section() {
|
||||
global $config;
|
||||
$new_section = &$config['virtualip'];
|
||||
foreach($new_section['vip'] as $section) {
|
||||
if($section['mode'] == "proxyarp" || $section['mode'] == "ipalias") {
|
||||
unset($section);
|
||||
}
|
||||
|
||||
if (is_array($config['virtualip']['vip']))
|
||||
return;
|
||||
$temp = array();
|
||||
$temp['vip'] = array();
|
||||
foreach($config['virtualip']['vip'] as $section) {
|
||||
if($section['mode'] == "proxyarp" || $section['mode'] == "ipalias")
|
||||
continue;
|
||||
if($section['advskew'] <> "") {
|
||||
$section_val = intval($section['advskew']);
|
||||
$section_val=$section_val+100;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user