From ebc2ee612f265cc996b465b2c2101378d5bdf88a Mon Sep 17 00:00:00 2001 From: Joecowboy Date: Sat, 18 Feb 2012 12:25:14 -0600 Subject: A friend of mine was having the same issue that was stated in another pull request with the explode function and white space. So when you commit changes on WLAN would throw and error stating MODE must have SSID set. Dropped the explode function all together, initialized the array first and then pushed the SSID onto the array if Mode is set to Access in your wireless configuration. No more Mode set issue. :D --- usr/local/www/interfaces.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php index 4a0d49e..6897bd1 100755 --- a/usr/local/www/interfaces.php +++ b/usr/local/www/interfaces.php @@ -561,9 +561,8 @@ if ($_POST['apply']) { $input_errors[] = gettext("The MSS must be greater than 576 bytes."); /* Wireless interface? */ if (isset($wancfg['wireless'])) { - $reqdfields = "mode"; - if($_POST['mode'] == 'hostap') { $reqdfields += " ssid"; } - $reqdfields = explode(" ", $reqdfields); + $reqdfields = array("mode"); + if($_POST['mode'] == 'hostap') { array_push($reqdfields, "ssid") } $reqdfieldsn = array(gettext("Mode"),gettext("SSID")); do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); check_wireless_mode(); -- cgit v1.1