Use "$@" (with quotes) to prevent whitespace problems

https://github.com/koalaman/shellcheck/wiki/SC2048
modified:   web-add.sh
This commit is contained in:
Patrick Marchand 2018-10-16 14:32:47 -04:00
parent 866f20ef47
commit 4aa0332639

View file

@ -193,7 +193,7 @@ validate_mail() {
validate_phpversion() { validate_phpversion() {
php_version="$1" php_version="$1"
if [[ ! " ${PHP_VERSIONS[@]} " =~ " ${php_version} " ]]; then if [[ ! " ${PHP_VERSIONS[*]} " =~ ${php_version} ]]; then
in_error "Version de PHP incorrecte." in_error "Version de PHP incorrecte."
return 1 return 1
fi fi
@ -674,25 +674,25 @@ arg_processing() {
case "$commandname" in case "$commandname" in
add) add)
op_add $* op_add "$@"
;; ;;
del) del)
op_del $* op_del "$@"
;; ;;
list-vhost) list-vhost)
op_listvhost $* op_listvhost "$@"
;; ;;
add-alias) add-alias)
op_aliasadd $* op_aliasadd "$@"
;; ;;
del-alias) del-alias)
op_aliasdel $* op_aliasdel "$@"
;; ;;
setphpversion) setphpversion)
op_setphpversion $* op_setphpversion "$@"
;; ;;
setquota) setquota)
op_setquota $* op_setquota "$@"
;; ;;
*) *)
usage usage