summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xrun-gomf.bash4
1 files changed, 2 insertions, 2 deletions
diff --git a/run-gomf.bash b/run-gomf.bash
index 78fa7ac..2e2c0ef 100755
--- a/run-gomf.bash
+++ b/run-gomf.bash
@@ -196,8 +196,8 @@ flags=()
[ -n "${MAX_SIZE_MIB}" ] && flags+=(--max-size "$((MAX_SIZE_MIB*1024*1024))")
[ "${WHITELIST:-0}" -ne 0 ] && flags+=(--whitelist)
oldifs="$IFS" IFS=,
-[ -n "$FILTER_EXT" ] && flags+=(--filter-ext "${FILTER_EXT[*]}")
-[ -n "$FILTER_MIME" ] && flags+=(--filter-mime "${FILTER_MIME[*]}")
+[ -n "$(declare -p FILTER_EXT 2>/dev/null)" ] && flags+=(--filter-ext "${FILTER_EXT[*]}")
+[ -n "$(declare -p FILTER_MIME 2>/dev/null)" ] && flags+=(--filter-mime "${FILTER_MIME[*]}")
IFS="$oldifs"
[ "${ALLOW_HTML:-0}" -ne 0 ] && flags+=(--allow-html)
[ "${CORS:-0}" -ne 0 ] && flags+=(--cors)