diff options
-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 |