Jump to content

get_browser error warning for some offsets but not all


Recommended Posts

I have browscap installed this way: 


If I use the following code: 

    $browser = get_browser(null, true);
	$brows_par = $browser['parent'];
	$browser = $browser['browser'];
	$version = $browser['version'];
 	$platform = $browser['platform'];
	$dev_type = $browser['device_type'];
	$mobile = $browser['ismobiledevice'];
	$tablet = $browser['istablet'];



Then I get error messages for the last 5 variable settings

error output:


Warning: Illegal string offset 'version'

and for the other offsets same error message except the first 2.


see the image for the var_dump value of $browser



what causes the Illegal String Offset warning error message?

Edited by BrainPill
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...