Print helpful error message on conditionals in global block (#1550)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2277 152afb58-edef-0310-8abb-c4023f1b3aa9svn/tags/lighttpd-1.4.20
parent
8d837b75d0
commit
e294fffbad
1
NEWS
1
NEWS
|
@ -48,6 +48,7 @@ NEWS
|
|||
* fixed url encoding to encode more characters (#266)
|
||||
* allow digits in [s]cgi env vars (#1712)
|
||||
* fixed dropping last character of evhost pattern (#161)
|
||||
* print helpful error message on conditionals in global block (#1550)
|
||||
|
||||
- 1.4.19 - 2008-03-10
|
||||
|
||||
|
|
|
@ -21,6 +21,10 @@ static void configparser_push(config_t *ctx, data_config *dc, int isnew) {
|
|||
dc->parent = ctx->current;
|
||||
array_insert_unique(dc->parent->childs, (data_unset *)dc);
|
||||
}
|
||||
if (ctx->configs_stack->used > 0 && ctx->current->context_ndx == 0) {
|
||||
fprintf(stderr, "Cannot use conditionals inside a global { ... } block\n");
|
||||
exit(-1);
|
||||
}
|
||||
array_insert_unique(ctx->configs_stack, (data_unset *)ctx->current);
|
||||
ctx->current = dc;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue