diff options
author | Erik Fonnesbeck <efonnes@gmail.com> | 2010-02-22 13:36:03 -0700 |
---|---|---|
committer | Erik Fonnesbeck <efonnes@gmail.com> | 2010-02-22 13:36:03 -0700 |
commit | 7de319a159430fa2954789cd2572511bb8d90a08 (patch) | |
tree | 977e7505fc62e3de5bcc3a3777b78195b47ff1a8 /etc | |
parent | 8f0289e7ec338869f28467b748e27f580792b201 (diff) | |
download | pfsense-7de319a159430fa2954789cd2572511bb8d90a08.zip pfsense-7de319a159430fa2954789cd2572511bb8d90a08.tar.gz |
Make sure ['wireless'] does not get accessed as an array when it is not an array.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/interfaces.inc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index a387b1e..718a6a1 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -1432,6 +1432,9 @@ function interface_sync_wireless_clones(&$ifcfg, $sync_changes = false) { $shared_settings = array('standard', 'turbo', 'protmode', 'channel', 'txpower'); + if(!is_array($ifcfg['wireless'])) + return; + if(!stristr($ifcfg['if'], "_wlan")) { $baseif1 = $ifcfg['if']; } else { @@ -1445,7 +1448,7 @@ function interface_sync_wireless_clones(&$ifcfg, $sync_changes = false) { } else { $baseif2 = substr($config['interfaces'][$if]['if'], 0, stripos($config['interfaces'][$if]['if'], "_wlan")); } - if ($baseif1 != $baseif2) { + if ($baseif1 != $baseif2 && is_array($config['interfaces'][$if]['wireless'])) { if (isset($config['interfaces'][$if]['wireless']['standard']) || $sync_changes) { foreach ($shared_settings as $setting) { if ($sync_changes) { |