Index: branches/5.2.x/core/kernel/session/inp_session_storage.php =================================================================== diff -u -N -r14572 -r14585 --- branches/5.2.x/core/kernel/session/inp_session_storage.php (.../inp_session_storage.php) (revision 14572) +++ branches/5.2.x/core/kernel/session/inp_session_storage.php (.../inp_session_storage.php) (revision 14585) @@ -1,7 +1,7 @@ $this->Application->isAdmin ? 0 : USER_GUEST, 'Language' => $this->Application->GetDefaultLanguageId(true), 'Theme' => $this->Application->GetDefaultThemeId(), - 'IpAddress' => $_SERVER['REMOTE_ADDR'], // getenv('REMOTE_ADDR') won't work on IIS, so use $_SERVER instead 'GroupId' => $this->Application->ConfigValue('User_GuestGroup'), 'GroupList' => $this->Application->ConfigValue('User_GuestGroup'), ); + if( isset($_SERVER['REMOTE_ADDR']) ) { + $fields_hash['IpAddress'] = $_SERVER['REMOTE_ADDR']; // getenv('REMOTE_ADDR') won't work on IIS, so use $_SERVER instead + } + return array_merge($fields_hash, parent::GetSessionDefaults()); }