bug in browser_detection_php_ar.txt 5.0.5
gem
Status: Interested
Joined: 05 Jan 2010
Posts: 10
Reply Quote
I have been patching browser_detection_php_ar.txt for several version to work around a bug.

I change line 398 from:
$s_browser = $r[0]
to:
$s_browser = empty( $r[0]) ? 'XXX' : $r[0];

To stop this:
Tue Jan 05 11:52:02 2010] [error] [client 173.162.75.46] PHP Notice: Undefined
offset: 0 in /home/sgteam/inc/browser_detection_php_ar.inc on line 398,

I also get this somethimes:
[Tue Jan 05 12:03:26 2010] [error] [client 8.12.144.16] PHP Warning: strpos() [<
a href='function.strpos'>function.strpos</a>]: needle is not a string or an integer in /home/sgteam/inc/browser_detection_php_ar.inc on line 687
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4126
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
The first was just failing to test the preg_match for success, that's fixed now in 5.1.0

the second one I cannot find any error in the code, so if you figure it out, let me know.
Back to top
gem
Status: Interested
Joined: 05 Jan 2010
Posts: 10
Reply Quote
I think the 2nd one was a result of the first one. Testing 5.1.0 now
Back to top
Display posts from previous:   

All times are GMT - 8 Hours