diff mbox

Allow setting an empty home page

Message ID 20171203125426.7943-1-lfleischer@archlinux.org
State Accepted, archived
Headers show

Commit Message

Lukas Fleischer via aur-dev Dec. 3, 2017, 12:54 p.m. UTC
Since commit 4efba18 (Only allow valid HTTP(s) URLs as home page,
2017-11-05), the home page field in the account settings must be a valid
URL. However, this new check prevents from leaving the field empty. Keep
the check in place but skip it if the home page field is left empty.

Fixes FS#56550.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
---
 web/lib/acctfuncs.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php
index b8d9dc5..df57375 100644
--- a/web/lib/acctfuncs.inc.php
+++ b/web/lib/acctfuncs.inc.php
@@ -162,7 +162,7 @@  function process_account_form($TYPE,$A,$U="",$T="",$S="",$E="",$H="",$P="",$C=""
 		$error = __("The email address is invalid.");
 	}
 
-	if (!$error && !valid_homepage($HP)) {
+	if (!$error && !empty($HP) && !valid_homepage($HP)) {
 		$error = __("The home page is invalid, please specify the full HTTP(s) URL.");
 	}