about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--cgitrc.5.txt2
-rw-r--r--shared.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/cgitrc.5.txt b/cgitrc.5.txt
index 4721c1e..a22423b 100644
--- a/cgitrc.5.txt
+++ b/cgitrc.5.txt
@@ -500,7 +500,7 @@ Also, all filters are handed the following environment variables:
 
 If a setting is not defined for a repository and the corresponding global
 setting is also not defined (if applicable), then the corresponding
-environment variable will be an empty string.
+environment variable will be unset.
 
 
 MACRO EXPANSION
diff --git a/shared.c b/shared.c
index 75c4b5c..0c8ce3e 100644
--- a/shared.c
+++ b/shared.c
@@ -392,7 +392,7 @@ void cgit_prepare_repo_env(struct cgit_repo * repo)
 	p = env_vars;
 	q = p + env_var_count;
 	for (; p < q; p++)
-		if (setenv(p->name, p->value, 1))
+		if (p->value && setenv(p->name, p->value, 1))
 			fprintf(stderr, warn, p->name, p->value);
 }