Projects ⇒ Bugs ⇒ #620: Undefined index: HTTP_USER_AGENT ⇒ CPG Dragonfly™ CMS
Bug #620 Undefined index: HTTP_USER_AGENT
Project: Dragonfly 9.0.3 -> 9.3 Category: *CPG Core Issues
Submitted: Monday, August 29, 2005 (02:06:30) Modified: Thursday, September 29, 2005 (21:43:58)
Status: Closed Assigned to: akamu
PHP Version: 4.4 HTTPD Server: Apache 2.0

View/Vote Add Comment

by: darkgrue
Description:
------------
If the user agent isn't set, the following error will appear in the log:

PHP Notice: Undefined index: HTTP_USER_AGENT in /usr/local/apache2/htdocs.tcf/includes/cmsinit.inc on line 17

Reproduce code:
---------------
In includes/cmsinit.inc, Line 17:

if ((($_SERVER['HTTP_USER_AGENT'] == '' || $_SERVER['HTTP_USER_AGENT'] == '-') && !defined('XMLFEED')) || defined('CORE_PATH')) { exit; }


Probably ought to be:

if ((((isset($_SERVER['HTTP_USER_AGENT']) && $_SERVER['HTTP_USER_AGENT'] == '') || $_SERVER['HTTP_USER_AGENT'] == '-') && !defined('XMLFEED')) || defined('CORE_PATH')) { exit; }
by: akamu
This bug has been fixed in the CVS.

Snapshots of the sources are packaged every 6 hours; this change
will be in the next snapshot. You can grab the snapshot at the
Downloads section.

Thank you for the report, and for helping us to make CPG-Nuke 9.0.3 -> 9.1 better.

/cvs/html/includes/cmsinit.inc,v9.66;
if (((empty($_SERVER['HTTP_USER_AGENT']) || $_SERVER['HTTP_USER_AGENT'] == '-') && !defined('XMLFEED')) || defined('CORE_PATH')) { exit; }
User Info

Welcome Anonymous



(Register)
Community

Support for DragonflyCMS in a other languages:

Deutsch
Español