diff --git a/xCAT-server/lib/xcat/plugins/networks.pm b/xCAT-server/lib/xcat/plugins/networks.pm index 256a93f16..c21c7f852 100644 --- a/xCAT-server/lib/xcat/plugins/networks.pm +++ b/xCAT-server/lib/xcat/plugins/networks.pm @@ -26,8 +26,7 @@ sub preprocess_request my @requests = ({%$req}); #first element is local instance $::args = $req->{arg}; - - if (defined(@{$::args})) { + if ( defined ($::args) && @{$::args} ) { @ARGV = @{$::args}; } @@ -88,7 +87,7 @@ sub process_request $::args = $request->{arg}; - if (defined(@{$::args})) { + if ( defined ($::args) && @{$::args} ) { @ARGV = @{$::args}; }