Fix processing of ldap_memberattr_format_re option

This makes sure that "" value is handled as before options processing
overhaul.

This fixed ldap shared roster testcase
This commit is contained in:
Paweł Chmielowski 2018-01-29 17:25:31 +01:00
parent dc601610b6
commit d2974cf48a
1 changed files with 5 additions and 1 deletions

View File

@ -575,7 +575,11 @@ mod_opt_type(ldap_memberattr_format) ->
fun iolist_to_binary/1;
mod_opt_type(ldap_memberattr_format_re) ->
fun (S) ->
Re = iolist_to_binary(S), {ok, MP} = re:compile(Re), MP
Re = iolist_to_binary(S),
case Re of
<<>> -> <<>>;
_ -> {ok, MP} = re:compile(Re), MP
end
end;
mod_opt_type(ldap_rfilter) ->
opt_type(ldap_rfilter);