mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 06:17:28 -08:00
Only add http:// if the url variable isn’t blank
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
a33276cb3d
commit
a57a6486e7
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue