From 6510b77d1d21cce441297cdb1d3ca0232f0c4f28 Mon Sep 17 00:00:00 2001 From: John Southworth Date: Mon, 1 Apr 2013 10:12:06 -0700 Subject: Bugfix 8830: Fix empty substitution in list search --- functions/interpreter/vyatta-common | 3 +++ 1 file changed, 3 insertions(+) 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 -- cgit v1.2.3