mirror of
https://github.com/LBRYFoundation/lbry.com.git
synced 2025-08-23 17:47:26 +00:00
check for null if not in production.
This commit is contained in:
parent
37b51b8fd1
commit
ab96e75968
1 changed files with 6 additions and 5 deletions
|
@ -34,12 +34,13 @@ class Session
|
|||
static::setNamespace(static::NAMESPACE_DEFAULT, $oldSession);
|
||||
}
|
||||
|
||||
$site_visitor_id = key_exists(static::USER_ID,$_SESSION) ? $_SESSION[static::USER_ID] : '';
|
||||
$response = LBRY::logWebVisitor(static::SITE_ID, $site_visitor_id, $_SERVER['REMOTE_ADDR']);
|
||||
if (key_exists('data',$response) && key_exists('visitor_id',$response['data']))
|
||||
{
|
||||
$site_visitor_id = key_exists(static::USER_ID, $_SESSION) ? $_SESSION[static::USER_ID] : '';
|
||||
$response = LBRY::logWebVisitor(static::SITE_ID, $site_visitor_id, $_SERVER['REMOTE_ADDR']);
|
||||
if (!is_null($response)
|
||||
&& key_exists('data', $response)
|
||||
&& key_exists('visitor_id', $response['data'])) {
|
||||
$_SESSION[static::USER_ID] = $response['data']['visitor_id'];
|
||||
}else{
|
||||
} else {
|
||||
$_SESSION[static::USER_ID] = '';
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue