sb3108sa / phpbrowscap

Automatically exported from code.google.com/p/phpbrowscap
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Inexistent parent browser causes fatal error #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
$agent = 'Mozilla/4.0 (compatible;)';
include 'browscap.php';
$bc = new Browscap('cache');
$bc_browser = $bc->getBrowser($agent);     
print_r($bc_browser);

What is the expected output? What do you see instead?
An Array with Browser-Infos

What version of the product are you using? On what operating system?
Browscap-php5-r10.zip, browscap.ini August 25, 2008 at 10:07:45 PM GMT

Please provide any additional information below.

Original issue reported on code.google.com by stuntsc...@gmail.com on 26 Aug 2008 at 6:40

GoogleCodeExporter commented 8 years ago
Can you please specify which kind of fatal error do you get?

http://sandbox.garetjax.info/browscap/ this is the result on my server. As you 
can see the whole thing works as 
expected.

Original comment by st.jonat...@gmail.com on 4 Sep 2008 at 8:13

GoogleCodeExporter commented 8 years ago
seems as if the error only occurs with the lite version of browscap.ini 
(lite_php_browscap.ini)

would you mind checking it again with the light version, or isnt the light 
version 
supported at all?

PHP error message is "Fatal error: Unsupported operand types in (file) on line 
269"

Line 269 is:
$browser    +=  $value;

Original comment by stuntsc...@gmail.com on 4 Sep 2008 at 8:23

GoogleCodeExporter commented 8 years ago
The Fatal error is due to an error in the lite version.
The "Rippers" browser (referred as parent from 'Mozilla/4.0 (compatible;)') 
does not exist in the lite version.

I just commited rev 11 which contains a fix for this bug, you can checkout the 
source and use this as a drop in, 
it should work.

I'll contact Gary about this error in the db asking him to correct it.

Original comment by st.jonat...@gmail.com on 4 Sep 2008 at 8:42

GoogleCodeExporter commented 8 years ago

Original comment by st.jonat...@gmail.com on 4 Sep 2008 at 8:43