From 4af6396ebf661063f8bc14b960a51a448b37326f Mon Sep 17 00:00:00 2001 From: Niko Storni Date: Tue, 19 Feb 2019 03:34:07 +0100 Subject: [PATCH] fix empty channel names --- view/template/acquisition/youtube_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/template/acquisition/youtube_edit.php b/view/template/acquisition/youtube_edit.php index ee0b202c..423d1e84 100644 --- a/view/template/acquisition/youtube_edit.php +++ b/view/template/acquisition/youtube_edit.php @@ -5,7 +5,7 @@ $email = Request::encodeStringFromUser($_POST['new_email']); $sync_consent = isset($_POST['sync_consent']); -if (!preg_match("/@[A-Za-z0-9-]+$/", $channel_name)) { +if ($channel_name !== "" && !preg_match("/@[A-Za-z0-9-]+$/", $channel_name)) { $channel_name = "@" . $channel_name; }