Merge branch 'PHP-7.3'

This commit is contained in:
Nikita Popov 2018-12-26 17:13:21 +01:00
commit fc30c0f7ad
2 changed files with 83 additions and 2 deletions

View File

@ -867,7 +867,7 @@ PHPAPI pcre2_code *pcre_get_compiled_regex(zend_string *regex, uint32_t *capture
pcre_cache_entry * pce = pcre_get_compiled_regex_cache(regex);
if (preg_options) {
*preg_options = pce ? pce->preg_options : 0;
*preg_options = 0;
}
if (capture_count) {
*capture_count = pce ? pce->capture_count : 0;
@ -884,7 +884,7 @@ PHPAPI pcre2_code* pcre_get_compiled_regex_ex(zend_string *regex, uint32_t *capt
pcre_cache_entry * pce = pcre_get_compiled_regex_cache(regex);
if (preg_options) {
*preg_options = pce ? pce->preg_options : 0;
*preg_options = 0;
}
if (compile_options) {
*compile_options = pce ? pce->compile_options : 0;

View File

@ -0,0 +1,81 @@
--TEST--
Bug #77338: get_browser with empty string
--INI--
browscap={PWD}/browscap.ini
--FILE--
<?php
var_dump(get_browser(""));
?>
--EXPECT--
object(stdClass)#1 (34) {
["browser_name_regex"]=>
string(6) "~^.*$~"
["browser_name_pattern"]=>
string(1) "*"
["browser"]=>
string(15) "Default Browser"
["version"]=>
string(1) "0"
["majorver"]=>
string(1) "0"
["minorver"]=>
string(1) "0"
["platform"]=>
string(7) "unknown"
["alpha"]=>
string(0) ""
["beta"]=>
string(0) ""
["win16"]=>
string(0) ""
["win32"]=>
string(0) ""
["win64"]=>
string(0) ""
["frames"]=>
string(1) "1"
["iframes"]=>
string(0) ""
["tables"]=>
string(1) "1"
["cookies"]=>
string(0) ""
["backgroundsounds"]=>
string(0) ""
["authenticodeupdate"]=>
string(1) "0"
["cdf"]=>
string(0) ""
["vbscript"]=>
string(0) ""
["javaapplets"]=>
string(0) ""
["javascript"]=>
string(0) ""
["activexcontrols"]=>
string(0) ""
["stripper"]=>
string(0) ""
["isbanned"]=>
string(0) ""
["wap"]=>
string(0) ""
["ismobiledevice"]=>
string(0) ""
["issyndicationreader"]=>
string(0) ""
["crawler"]=>
string(0) ""
["css"]=>
string(1) "0"
["cssversion"]=>
string(1) "0"
["supportscss"]=>
string(0) ""
["aol"]=>
string(0) ""
["aolversion"]=>
string(1) "0"
}