cvs: pearweb /include browser.php
| From: | Derick Rethans | Date: | Mon, 25 Nov 2002 10:18:23 +0000 |
| Subject: | cvs: pearweb /include browser.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-7573@lists.php.net to get a copy of this message | ||
derick Mon Nov 25 05:18:23 2002 EDT
Modified files:
/pearweb/include browser.php
Log:
- The User agent is not always set (for example with cURL requests); without
this XML-RPC things broke.
Index: pearweb/include/browser.php
diff -u pearweb/include/browser.php:1.2 pearweb/include/browser.php:1.3
--- pearweb/include/browser.php:1.2 Mon Nov 25 05:13:05 2002
+++ pearweb/include/browser.php Mon Nov 25 05:18:23 2002
@@ -15,7 +15,7 @@
+----------------------------------------------------------------------+
| Authors: Richard Heyes |
+----------------------------------------------------------------------+
- $Id: browser.php,v 1.2 2002/11/25 10:13:05 derick Exp $
+ $Id: browser.php,v 1.3 2002/11/25 10:18:23 derick Exp $
*/
/**
@@ -81,7 +81,11 @@
{
// Detemine what user agent we are using
if (is_null($in_userAgent)) {
+ if (isset($GLOBALS['HTTP_SERVER_VARS']['HTTP_USER_AGENT'])) {
$this->userAgent =
$GLOBALS['HTTP_SERVER_VARS']['HTTP_USER_AGENT'];
+ } else {
+ $this->userAgent = '';
+ }
} else {
$this->userAgent = $in_userAgent;
}