mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-21 09:01:29 +02:00
[ticket/12931] Fix general error on user registration
Fix "Illegal use of $_SERVER" general error on user registration when $config['server_name'] is not set. PHPBB3-12931
This commit is contained in:
@@ -402,17 +402,9 @@ class messenger
|
||||
*/
|
||||
function generate_message_id()
|
||||
{
|
||||
global $config;
|
||||
global $config, $request;
|
||||
|
||||
$domain = 'phpbb.generated';
|
||||
if ($config['server_name'])
|
||||
{
|
||||
$domain = $config['server_name'];
|
||||
}
|
||||
else if (!empty($_SERVER['SERVER_NAME']))
|
||||
{
|
||||
$domain = $_SERVER['SERVER_NAME'];
|
||||
}
|
||||
$domain = ($config['server_name']) ?: $request->server('SERVER_NAME', 'phpbb.generated');
|
||||
|
||||
return md5(unique_id(time())) . '@' . $domain;
|
||||
}
|
||||
|
Reference in New Issue
Block a user