diff --git a/public/bin/editlist.php b/public/bin/editlist.php index e9c080c..914dfdf 100644 --- a/public/bin/editlist.php +++ b/public/bin/editlist.php @@ -70,7 +70,9 @@ if ($_SESSION['log'] == 1) { $oldlistdestinations[3][] = $row['destination_username'] . '@' . $row['destination_domain']; } $newlistdestinations = array(array(),array(),array()); - foreach (explode(' ', $_POST['newlistdestinations']) as $newlistdestination) { + // replace newlines in userinput newlistdestination to avoid error + $postnewlistdestinations = preg_replace('~\R~u', " ", $_POST['newlistdestinations']); + foreach (explode(' ', $postnewlistdestinations) as $newlistdestination) { $newlistdestinationex = explode('@', $newlistdestination); array_push($newlistdestinations[0], $newlistdestinationex[0]); array_push($newlistdestinations[1], $newlistdestinationex[1]);