From 539727330bbd247feb1375f1608ec2b0bf93e44d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= Date: Thu, 4 Oct 2018 20:30:42 +0200 Subject: [PATCH] [Web] Fix domain admin edit function --- data/web/inc/functions.domain_admin.inc.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/data/web/inc/functions.domain_admin.inc.php b/data/web/inc/functions.domain_admin.inc.php index 3151350c..f71a42a1 100644 --- a/data/web/inc/functions.domain_admin.inc.php +++ b/data/web/inc/functions.domain_admin.inc.php @@ -162,15 +162,14 @@ function domain_admin($_action, $_data = null) { $password = $_data['password']; $password2 = $_data['password2']; if (!empty($domains)) { - foreach ($domains as $i => &$domain) { + foreach ($domains as $domain) { if (!is_valid_domain_name($domain)) { $_SESSION['return'][] = array( 'type' => 'danger', 'log' => array(__FUNCTION__, $_action, $_data_log), 'msg' => array('domain_invalid', htmlspecialchars($domain)) ); - unset($domains[$i]); - continue; + continue 2; } } } @@ -208,7 +207,6 @@ function domain_admin($_action, $_data = null) { )); } } - if (!empty($password) && !empty($password2)) { if (!preg_match('/' . $GLOBALS['PASSWD_REGEP'] . '/', $password)) { $_SESSION['return'][] = array(