|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68021 get_browser() browser_name_regex returns non-utf-8 characters
Submitted: 2014-09-15 21:54 UTC Modified: 2014-10-08 05:56 UTC
Avg. Score:3.4 ± 0.7
Reproduced:3 of 3 (100.0%)
Same Version:5 (166.7%)
Same OS:1 (33.3%)
From: justin at commando dot io Assigned:
Status: Closed Package: Unicode Engine related
PHP Version: 5.4.32 OS: CentOS 6.5
Private report: No CVE-ID: None
 [2014-09-15 21:54 UTC] justin at commando dot io
Calling get_browser() with a user-agent of:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36

Returns non-utf8 characters in the `browser_name_regex` field. See:

stdClass Object ( [browser_name_regex] => �^mozilla/5\.0 \(.*mac os x 10_9.*\) applewebkit/.* \(khtml, like gecko\).*chrome/35\..*safari/.*$� 

This breaks json_decode() trying to store it.

Expected result:
Never return non-utf8 characters. This breaks json_decode();


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-10-08 05:56 UTC] justin at commando dot io
> This breaks json_decode() trying to store it.

Brain fart there, that should have been json_encode() trying to store it.
 [2015-03-23 05:14 UTC]
Automatic comment on behalf of datibbaw
Log: Fixed #68021 - get_browser() browser_name_regex
 [2015-03-23 05:14 UTC]
-Status: Open +Status: Closed
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue May 30 19:03:40 2023 UTC