fix error with misArg not being declared

also fixed test to work on empty string or not for error reporting
reviewable/pr18780/r1
Brian Coca 9 years ago
parent cbe0211f3d
commit 641a347d96

@ -205,6 +205,7 @@ $direction=Get-Attr $params "direction" "";
$force=Get-Attr $params "force" $false; $force=Get-Attr $params "force" $false;
$action=Get-Attr $params "action" ""; $action=Get-Attr $params "action" "";
$misArg = ''
# Check the arguments # Check the arguments
if ($enable -ne $null) { if ($enable -ne $null) {
if ($enable -eq $true) { if ($enable -eq $true) {
@ -262,7 +263,7 @@ foreach ($arg in $args){
$winprofile=Get-Attr $params "profile" "current"; $winprofile=Get-Attr $params "profile" "current";
$fwsettings.Add("profile", $winprofile) $fwsettings.Add("profile", $winprofile)
if ($($($misArg|measure).count) -gt 0){ if ($misArg){
$result=New-Object psobject @{ $result=New-Object psobject @{
changed=$false changed=$false
failed=$true failed=$true

Loading…
Cancel
Save