Index: branches/5.1.x/core/kernel/utility/http_query.php =================================================================== diff -u -N -r14241 -r14325 --- branches/5.1.x/core/kernel/utility/http_query.php (.../http_query.php) (revision 14241) +++ branches/5.1.x/core/kernel/utility/http_query.php (.../http_query.php) (revision 14325) @@ -1,6 +1,6 @@ Conn =& $this->Application->GetADODBConnection(); $this->Order = $order; - if (array_key_exists('HTTP_X_REQUESTED_WITH', $_SERVER) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') { + if ( isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') { // when AJAX request is made from jQuery, then create ajax variable, // so any logic based in it (like redirects) will not break down $_GET['ajax'] = 'yes'; Index: branches/5.1.x/core/units/helpers/curl_helper.php =================================================================== diff -u -N -r14241 -r14325 --- branches/5.1.x/core/units/helpers/curl_helper.php (.../curl_helper.php) (revision 14241) +++ branches/5.1.x/core/units/helpers/curl_helper.php (.../curl_helper.php) (revision 14325) @@ -1,6 +1,6 @@ 1, CURLOPT_REFERER => PROTOCOL.SERVER_NAME, - CURLOPT_USERAGENT => $_SERVER['HTTP_USER_AGENT'], - + // don't verify SSL certificates CURLOPT_SSL_VERIFYPEER => false, CURLOPT_HTTPHEADER => Array ('Expect:'), ); + if ( isset($_SERVER['HTTP_USER_AGENT']) ) { + $default_options[CURLOPT_USERAGENT] = $_SERVER['HTTP_USER_AGENT']; + } + if ($this->requestHeaders) { $default_options[CURLOPT_HTTPHEADER] = $this->prepareHeaders(); } Index: branches/5.1.x/core/kernel/globals.php =================================================================== diff -u -N -r14241 -r14325 --- branches/5.1.x/core/kernel/globals.php (.../globals.php) (revision 14241) +++ branches/5.1.x/core/kernel/globals.php (.../globals.php) (revision 14325) @@ -1,6 +1,6 @@ $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($session)); }