From: Roland Häder Date: Mon, 23 Jul 2018 22:52:07 +0000 (+0200) Subject: Avoid no needed call on parse2str() when there is nothing to parse (#5476) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=14a4d5eb59a172f8e3d011963140b1ea95e31c5c;p=friendica.git Avoid no needed call on parse2str() when there is nothing to parse (#5476) --- diff --git a/mod/settings.php b/mod/settings.php index 6c7d0fafe7..e8e1eddc21 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -527,10 +527,10 @@ function settings_post(App $a) date_default_timezone_set($timezone); } - $str_group_allow = perms2str(defaults($_POST, 'group_allow' , '')); - $str_contact_allow = perms2str(defaults($_POST, 'contact_allow', '')); - $str_group_deny = perms2str(defaults($_POST, 'group_deny' , '')); - $str_contact_deny = perms2str(defaults($_POST, 'contact_deny' , '')); + $str_group_allow = !empty($_POST['group_allow']) ? perms2str($_POST['group_allow']) : ''; + $str_contact_allow = !empty($_POST['contact_allow']) ? perms2str($_POST['contact_allow']) : ''; + $str_group_deny = !empty($_POST['group_deny']) ? perms2str($_POST['group_deny']) : ''; + $str_contact_deny = !empty($_POST['contact_deny']) ? perms2str($_POST['contact_deny']) : ''; $openidserver = $a->user['openidserver']; //$openid = normalise_openid($openid);