Skip to content

Commit

Permalink
Fix GUID generation when SERVER_NAME is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
sim6 authored and mrubinsk committed Dec 18, 2021
1 parent dc343fe commit f2d1b4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Horde/Support/Guid.php
Expand Up @@ -57,7 +57,7 @@ public function generate(array $opts = array())
. (isset($opts['prefix']) ? $opts['prefix'] . '.' : '')
. strval(new Horde_Support_Randomid())
. '@'
. (isset($opts['server']) ? $opts['server'] : (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'localhost'));
. (isset($opts['server']) ? $opts['server'] : (!empty($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'localhost'));
}

/**
Expand Down

0 comments on commit f2d1b4b

Please sign in to comment.