We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
browscap-php/src/Browscap.php
Lines 103 to 104 in 6ab240a
There's not parameter $return_array that I can pass to ->getBrowser(). Is this a bug or am I missing something?
->getBrowser()
The text was updated successfully, but these errors were encountered:
I think this is probably just a documentation issue (looks like that parameter was removed long ago. It was in the 2.0 implementation: https://github.com/browscap/browscap-php/blob/2.x/src/phpbrowscap/Browscap.php#L297 but was removed by the first alpha version of the 3.0 release: https://github.com/browscap/browscap-php/blob/3.0.0-alpha.1/src/Browscap.php#L285)
Since getBrowser returns a stdClass, you can just cast that to an array, like so:
getBrowser
stdClass
$browser = (array) $browscap->getBrowser('user-agent');
example: https://3v4l.org/mRXqA
Sorry, something went wrong.
Thank you! I was a bit confused, but it's working. Did a pull request. See: #253
asgrim
No branches or pull requests
browscap-php/src/Browscap.php
Lines 103 to 104 in 6ab240a
There's not parameter $return_array that I can pass to
->getBrowser()
. Is this a bug or am I missing something?The text was updated successfully, but these errors were encountered: