diff --git a/funcs/func_logic.c b/funcs/func_logic.c index 9fe23b20b2..daf50142f7 100644 --- a/funcs/func_logic.c +++ b/funcs/func_logic.c @@ -111,7 +111,7 @@ static int acf_if(struct ast_channel *chan, char *cmd, char *data, char *buf, if (iffalse) iffalse = ast_strip_quoted(iffalse, "\"", "\""); - ast_copy_string(buf, pbx_checkcondition(expr) ? iftrue : iffalse, len); + ast_copy_string(buf, pbx_checkcondition(expr) ? (S_OR(iftrue, "")) : (S_OR(iffalse, "")), len); return 0; }