From 14a4d5eb59a172f8e3d011963140b1ea95e31c5c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 24 Jul 2018 00:52:07 +0200 Subject: [PATCH] Avoid no needed call on parse2str() when there is nothing to parse (#5476) --- mod/settings.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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); -- 2.39.5