com php-src: Merge branch 'PHP-7.0' into PHP-7.1: Zend/zend_A PI.c Zend/zend_API.h Zend/zend_builtin_functions .c Zend/zend_generators.c
ext/pcre/php_pcre.c e xt/reflection/php_reflection.c ext/spl/spl_array.c ext/standard/array.c ext/standard/basic_functions.c e xt/standard/file.c
ext/standard/filestat.c ext/standard /formatted_print.c ext/standard/html.c ext/standard/m ath.c ext/standard/streamsfuncs.c ext/standard/string .c
ext/standard/type.c ext/st

From: Date: Sun, 11 Sep 2016 21:46:20 +0000
Subject: com php-src: Merge branch 'PHP-7.0' into PHP-7.1: Zend/zend_A PI.c Zend/zend_API.h Zend/zend_builtin_functions .c Zend/zend_generators.c
ext/pcre/php_pcre.c e xt/reflection/php_reflection.c ext/spl/spl_array.c ext/standard/array.c ext/standard/basic_functions.c e xt/standard/file.c
ext/standard/filestat.c ext/standard /formatted_print.c ext/standard/html.c ext/standard/m ath.c ext/standard/streamsfuncs.c ext/standard/string .c
ext/standard/type.c ext/st
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-94428@lists.php.net to get a copy of this message
Commit: fc5497cb923df43e20deff3e03d1bfa50acc0570 Author: Andrea Faulds <ajf@ajf.me> Sun, 11 Sep 2016 22:46:20 +0100 Parents: c90f7f66eadb8bc5577c39b9b4d6a4fe2d60f78e d690014bf35507ccb7a1150a27504d2f87848842 Branches: PHP-7.1 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=fc5497cb923df43e20deff3e03d1bfa50acc0570 Log: Merge branch 'PHP-7.0' into PHP-7.1 Changed paths: MM Zend/zend_API..c MM Zend/zend_API.h MM Zend/zend_builtin_functions.c MM Zend/zend_generators.c MM ext/pcre/php_pcre.c MM ext/reflection/php_reflection.c MM ext/spl/spl_array.c MM ext/standard/array.c MM ext/standard/basic_functions.c MM ext/standard/file.c MM ext/standard/filestat.c MM ext/standard/formatted_print.c MM ext/standard/html.c MM ext/standard/math.c MM ext/standard/streamsfuncs.c MM ext/standard/string.c MM ext/standard/type.c MM ext/standard/url.c Diff: diff --cc Zend/zend_API.c index eaed067,4c77aa9..475e3a7 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@@ -202,8 -197,7 +202,7 @@@ ZEND_API char *zend_zval_type_name(cons } /* }}} */ - #ifdef FAST_ZPP -ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_paramers_count_error(int num_args, int min_num_args, int max_num_args) /* {{{ */ +ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_count_error(int num_args, int min_num_args, int max_num_args) /* {{{ */ { zend_function *active_function = EG(current_execute_data)->func; const char *class_name = active_function->common.scope ? ZSTR_VAL(active_function->common.scope->name) : ""; diff --cc Zend/zend_builtin_functions.c index c84a1f1,4f2a62d..f118ebd --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@@ -767,14 -683,9 +761,9 @@@ ZEND_FUNCTION(each Return the current error_reporting level, and if an argument was passed - change to the new level */ ZEND_FUNCTION(error_reporting) { - zval *err; + zval *err = NULL; int old_error_reporting; - #ifndef FAST_ZPP - if (zend_parse_parameters(ZEND_NUM_ARGS(), "|z", &err) == FAILURE) { - return; - } - #else ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_ZVAL(err) @@@ -988,14 -892,8 +970,8 @@@ ZEND_FUNCTION(defined ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STR(name) ZEND_PARSE_PARAMETERS_END(); - #endif - if (zend_get_constant_ex(name, NULL, ZEND_FETCH_CLASS_SILENT)) { + if (zend_get_constant_ex(name, zend_get_executed_scope(), ZEND_FETCH_CLASS_SILENT)) { RETURN_TRUE; } else { RETURN_FALSE; diff --cc ext/standard/array.c index af9734d,136890c..078b84a --- a/ext/standard/array.c +++ b/ext/standard/array.c @@@ -1550,15 -1474,8 +1496,8 @@@ PHP_FUNCTION(array_walk orig_array_walk_fci = BG(array_walk_fci); orig_array_walk_fci_cache = BG(array_walk_fci_cache); - #ifndef FAST_ZPP - if (zend_parse_parameters(ZEND_NUM_ARGS(), "A/f|z/", &array, &BG(array_walk_fci), &BG(array_walk_fci_cache), &userdata) == FAILURE) { - BG(array_walk_fci) = orig_array_walk_fci; - BG(array_walk_fci_cache) = orig_array_walk_fci_cache; - return; - } - #else ZEND_PARSE_PARAMETERS_START(2, 3) - Z_PARAM_ARRAY_OR_OBJECT_HT_EX(array, 0, 1) + Z_PARAM_ARRAY_OR_OBJECT_EX(array, 0, 1) Z_PARAM_FUNC(BG(array_walk_fci), BG(array_walk_fci_cache)) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_EX(userdata, 0, 1) @@@ -3237,13 -3088,8 +3139,8 @@@ static inline void php_array_merge_or_r { zval *args = NULL; zval *arg; - int argc, i, init_size = 0; + int argc, i; - #ifndef FAST_ZPP - if (zend_parse_parameters(ZEND_NUM_ARGS(), "+", &args, &argc) == FAILURE) { - return; - } - #else ZEND_PARSE_PARAMETERS_START(1, -1) Z_PARAM_VARIADIC('+', args, argc) ZEND_PARSE_PARAMETERS_END(); diff --cc ext/standard/string.c index a3b0add,c3becb9..5e6b207 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@@ -1971,11 -1922,7 +1930,10 @@@ PHP_FUNCTION(strpos Z_PARAM_OPTIONAL Z_PARAM_LONG(offset) ZEND_PARSE_PARAMETERS_END(); - #endif + if (offset < 0) { + offset += (zend_long)ZSTR_LEN(haystack); + } if (offset < 0 || (size_t)offset > ZSTR_LEN(haystack)) { php_error_docref(NULL, E_WARNING, "Offset not contained in string"); RETURN_FALSE; diff --cc ext/standard/type.c index 3f97bc8,c946992..60884da --- a/ext/standard/type.c +++ b/ext/standard/type.c @@@ -152,9 -147,8 +147,8 @@@ PHP_FUNCTION(intval Z_PARAM_OPTIONAL Z_PARAM_LONG(base) ZEND_PARSE_PARAMETERS_END(); - #endif - if (Z_TYPE_P(num) != IS_STRING) { + if (Z_TYPE_P(num) != IS_STRING || base == 10) { RETVAL_LONG(zval_get_long(num)); } else { RETVAL_LONG(ZEND_STRTOL(Z_STRVAL_P(num), NULL, base));

« previous php.cvs (#94428) next »