mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 12:48:29 +00:00
Keep a trailing newline in the regex list when deleting an item
Fixes #874 Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
@@ -36,7 +36,7 @@ switch($type) {
|
||||
$list = array_diff($list, array($_POST['domain'], ""));
|
||||
$list = implode("\n", $list);
|
||||
|
||||
if(file_put_contents($regexfile, $list) === FALSE)
|
||||
if(file_put_contents($regexfile, $list."\n") === FALSE)
|
||||
{
|
||||
$err = error_get_last()["message"];
|
||||
echo "Unable to remove regex \"".htmlspecialchars($_POST['domain'])."\" from ${regexfile}<br>Error message: $err";
|
||||
|
||||
Reference in New Issue
Block a user