mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 05:04:07 -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)
|
||||
{
|
||||
if (! preg_match('~^(?:f|ht)tps?://~i', $url)) {
|
||||
if (($url!='') && (! preg_match('~^(?:f|ht)tps?://~i', $url))) {
|
||||
$url = 'http://'.$url;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue