diff options
author | John Southworth <john.southworth@vyatta.com> | 2013-04-01 10:12:06 -0700 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2013-04-01 10:12:06 -0700 |
commit | 6510b77d1d21cce441297cdb1d3ca0232f0c4f28 (patch) | |
tree | b66e1cdae648be3443b6ac7301df091e356c3793 | |
parent | 90d33710e06a26b0e834cbfbd956139d3e7052a0 (diff) | |
download | vyatta-op-6510b77d1d21cce441297cdb1d3ca0232f0c4f28.tar.gz vyatta-op-6510b77d1d21cce441297cdb1d3ca0232f0c4f28.zip |
Bugfix 8830: Fix empty substitution in list search
-rw-r--r-- | functions/interpreter/vyatta-common | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/functions/interpreter/vyatta-common b/functions/interpreter/vyatta-common index c6e645f..296abd2 100644 --- a/functions/interpreter/vyatta-common +++ b/functions/interpreter/vyatta-common @@ -72,6 +72,9 @@ get_prefix_filtered_list2 () is_elem_of () { local elem=$1 local -a olist + if [[ -z $2 ]]; then + return 1 + fi eval "olist=( \"\${$2[@]}\" )" for e in ${olist[*]}; do if [[ "$e" == "$elem" ]]; then |