From d2974cf48a1bc22c7adfedc91bafdd80c8494ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chmielowski?= Date: Mon, 29 Jan 2018 17:25:31 +0100 Subject: [PATCH] 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 --- src/mod_shared_roster_ldap.erl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mod_shared_roster_ldap.erl b/src/mod_shared_roster_ldap.erl index 745430cad..04db34efe 100644 --- a/src/mod_shared_roster_ldap.erl +++ b/src/mod_shared_roster_ldap.erl @@ -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);