From ccaeca19eb940f24e848e895a757e977f821ff4e Mon Sep 17 00:00:00 2001 From: Shish Date: Mon, 18 Jan 2010 08:29:35 +0000 Subject: [PATCH] make make_http not break with '' as an argument --- core/util.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/util.inc.php b/core/util.inc.php index c36bc29f..11b9ad20 100644 --- a/core/util.inc.php +++ b/core/util.inc.php @@ -196,7 +196,7 @@ function make_link($page=null, $query=null) { */ function make_http($link) { if(strpos($link, "ttp://") > 0) return $link; - if($link[0] != '/') $link = get_base_href().'/'.$link; + if(strlen($link) > 0 && $link[0] != '/') $link = get_base_href().'/'.$link; $link = "http://".$_SERVER["HTTP_HOST"].$link; $link = str_replace("/./", "/", $link); return $link;