mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Merge branch 'PHP-5.6' into PHP-7.0
This commit is contained in:
commit
8fcfacf746
2
NEWS
2
NEWS
@ -72,6 +72,8 @@ PHP NEWS
|
||||
. Fixed bug #55451 (substr_compare NULL length interpreted as 0). (Lauri
|
||||
Kenttä)
|
||||
. Fixed bug #72278 (getimagesize returning FALSE on valid jpg). (cmb)
|
||||
. Fixed bug #65550 (get_browser() incorrectly parses entries with "+" sign).
|
||||
(cmb)
|
||||
|
||||
- Streams:
|
||||
. Fixed bug #72853 (stream_set_blocking doesn't work). (Laruence)
|
||||
|
@ -115,6 +115,10 @@ static void convert_browscap_pattern(zval *pattern, int persistent) /* {{{ */
|
||||
t[j++] = '\\';
|
||||
t[j] = '~';
|
||||
break;
|
||||
case '+':
|
||||
t[j++] = '\\';
|
||||
t[j] = '+';
|
||||
break;
|
||||
default:
|
||||
t[j] = lc_pattern[i];
|
||||
break;
|
||||
|
19
ext/standard/tests/misc/bug65550.phpt
Normal file
19
ext/standard/tests/misc/bug65550.phpt
Normal file
@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
Bug #65550 (get_browser() incorrectly parses entries with "+" sign)
|
||||
--INI--
|
||||
browscap={PWD}/browscap.ini
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!is_readable(ini_get('browscap'))) die('skip browscap.ini file ' . ini_get('browscap') . ' not readable');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$user_agent = 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/522+ (KHTML, like Gecko, Safari/522) OmniWeb/v613';
|
||||
$caps = get_browser($user_agent, true);
|
||||
var_dump($caps['browser'], $caps['version']);
|
||||
?>
|
||||
==DONE==
|
||||
--EXPECT--
|
||||
string(7) "OmniWeb"
|
||||
string(3) "5.6"
|
||||
==DONE==
|
Loading…
Reference in New Issue
Block a user