diff --git a/NEWS b/NEWS index b2f9c4b3a66..12cc50d0648 100644 --- a/NEWS +++ b/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) diff --git a/ext/standard/browscap.c b/ext/standard/browscap.c index f47478a2415..8ad55829c8a 100644 --- a/ext/standard/browscap.c +++ b/ext/standard/browscap.c @@ -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; diff --git a/ext/standard/tests/misc/bug65550.phpt b/ext/standard/tests/misc/bug65550.phpt new file mode 100644 index 00000000000..41967426fa3 --- /dev/null +++ b/ext/standard/tests/misc/bug65550.phpt @@ -0,0 +1,19 @@ +--TEST-- +Bug #65550 (get_browser() incorrectly parses entries with "+" sign) +--INI-- +browscap={PWD}/browscap.ini +--SKIPIF-- + +--FILE-- + +==DONE== +--EXPECT-- +string(7) "OmniWeb" +string(3) "5.6" +==DONE==