Only add http:// if the url variable isn’t blank

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2022-06-14 16:11:13 -07:00
parent a33276cb3d
commit a57a6486e7

View file

@ -184,7 +184,7 @@ class Supplier extends SnipeModel
*/ */
public function addhttp($url) public function addhttp($url)
{ {
if (! preg_match('~^(?:f|ht)tps?://~i', $url)) { if (($url!='') && (! preg_match('~^(?:f|ht)tps?://~i', $url))) {
$url = 'http://'.$url; $url = 'http://'.$url;
} }