Mantis Bug Tracker
 

View Issue Details Jump to Notes ] Wiki ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0009714mantisbtcsvpublic2008-10-20 06:372008-11-21 16:08
Reporterpolzin 
Assigned Tojreese 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.1.4 
Target VersionFixed in Version1.1.5 
Summary0009714: Error message/warning, if HTTP_USER_AGENT is not set
Descriptioncore.php queries HTTP_USER_AGENT without testing for existance. This gives errors e.g. when using the "core/checkin.php" for cvs integration (only if $g_display_errors is set to strict reporting of warnings).

Suggested Fix:


core.php 1.10 -> 1.11

diff -u -r1.10 -r1.11
--- core.php 20 Oct 2008 09:25:07 -0000 1.10
+++ core.php 20 Oct 2008 10:21:04 -0000 1.11
@@ -145,7 +145,13 @@

     require_once( $t_core_path.'database_api.php' );
 
     # Basic browser detection

- $t_user_agent = $_SERVER['HTTP_USER_AGENT'];

+ if ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) {
+ $t_user_agent = $_SERVER['HTTP_USER_AGENT'];
+ } else {
+ $t_user_agent = '';
+ }
+
+

 
     $t_browser_name = 'Normal';
     if ( strpos( $t_user_agent, 'MSIE' ) ) {
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
User avatar (0019596)
jreese (administrator)
2008-10-20 08:52

Fixed in SVN trunk, r5652, and 1.1.x, r5699.

- Issue History
Date Modified Username Field Change
2008-10-20 06:37 polzin New Issue
2008-10-20 08:52 jreese Note Added: 0019596
2008-10-20 08:52 jreese Status new => resolved
2008-10-20 08:52 jreese Fixed in Version => 1.1.5
2008-10-20 08:52 jreese Resolution open => fixed
2008-10-20 08:52 jreese Assigned To => jreese
2008-11-21 16:08 jreese Status resolved => closed


MantisBT 1.2.0rc2 git live[^]
Copyright © 2000 - 2010 MantisBT Group
Time: 0.1960 seconds.
memory usage: 1,789 KB
Powered by Mantis Bugtracker