1
0
Fork 0

don't add http:// if homepage is not set

This commit is contained in:
Tobias Diekershoff 2014-06-22 09:44:59 +02:00
parent 64946972b2
commit b6e546d1e3

View file

@ -288,7 +288,7 @@ function profiles_post(&$a) {
$sexual = notags(trim($_POST['sexual']));
$homepage = notags(trim($_POST['homepage']));
if (strpos($homepage, 'http') !== 0) {
if ((strpos($homepage, 'http') !== 0) && (strlen($homepage))) {
// neither http nor https in URL, add them
$homepage = 'http://'.$homepage;
}