mirror of
https://github.com/Mibew/mibew.git
synced 2024-11-15 00:24:12 +03:00
Check if HTTP_USER_AGENT is set, use empty string otherwise
This commit is contained in:
parent
637758c13e
commit
e676ca47dc
@ -644,7 +644,9 @@ function chat_start_for_user(
|
||||
) {
|
||||
// Get user info
|
||||
$remote_host = get_remote_host();
|
||||
$user_browser = $_SERVER['HTTP_USER_AGENT'];
|
||||
$user_browser = isset($_SERVER['HTTP_USER_AGENT'])
|
||||
? $_SERVER['HTTP_USER_AGENT']
|
||||
: '';
|
||||
|
||||
// Check connection limit
|
||||
if (Thread::connectionLimitReached($remote_host)) {
|
||||
|
@ -774,7 +774,9 @@ class ThreadProcessor extends ClientSideProcessor implements
|
||||
|
||||
// Create thread for left message
|
||||
$remote_host = get_remote_host();
|
||||
$user_browser = $_SERVER['HTTP_USER_AGENT'];
|
||||
$user_browser = isset($_SERVER['HTTP_USER_AGENT'])
|
||||
? $_SERVER['HTTP_USER_AGENT']
|
||||
: '';
|
||||
$visitor = visitor_from_request();
|
||||
|
||||
// Get message locale
|
||||
|
@ -187,7 +187,9 @@ function track_get_path($visitor)
|
||||
function track_build_details()
|
||||
{
|
||||
$result = array(
|
||||
'user_agent' => $_SERVER['HTTP_USER_AGENT'],
|
||||
'user_agent' => (isset($_SERVER['HTTP_USER_AGENT'])
|
||||
? $_SERVER['HTTP_USER_AGENT']
|
||||
: ''),
|
||||
'remote_host' => get_remote_host(),
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user