diff options
author | Gabriel Caruso <carusogabriel34@gmail.com> | 2019-05-18 16:17:06 -0300 |
---|---|---|
committer | Gabriel Caruso <carusogabriel34@gmail.com> | 2019-05-18 16:17:06 -0300 |
commit | a437f065b87c5b440152d6de1d0ec01034030dfe (patch) | |
tree | 403134b64f137f34de1c5c8f51f3e691b5a2cd1c | |
parent | b91cf9bb8c26fc15e487745d5c63ba42b3921895 (diff) | |
parent | 714d9fc358640069bda5540c2b1136a6241c4c94 (diff) | |
download | php-git-a437f065b87c5b440152d6de1d0ec01034030dfe.tar.gz |
Merge branch 'PHP-7.4'
* PHP-7.4:
Make chr ZPP failure message consistent with ext/standard
-rw-r--r-- | ext/standard/string.c | 6 | ||||
-rw-r--r-- | ext/standard/tests/array/array_filter_variation9.phpt | 2 | ||||
-rw-r--r-- | ext/standard/tests/strings/chr_variation1.phpt | 29 |
3 files changed, 7 insertions, 30 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c index 0e0b9751ee..3641b739f5 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -2632,11 +2632,7 @@ PHP_FUNCTION(chr) { zend_long c; - if (ZEND_NUM_ARGS() != 1) { - WRONG_PARAM_COUNT; - } - - ZEND_PARSE_PARAMETERS_START_EX(ZEND_PARSE_PARAMS_QUIET, 1, 1) + ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_LONG(c) ZEND_PARSE_PARAMETERS_END_EX(c = 0); diff --git a/ext/standard/tests/array/array_filter_variation9.phpt b/ext/standard/tests/array/array_filter_variation9.phpt index 1755a322b0..35cc218868 100644 --- a/ext/standard/tests/array/array_filter_variation9.phpt +++ b/ext/standard/tests/array/array_filter_variation9.phpt @@ -53,6 +53,8 @@ array(6) { [5]=> int(1000) } + +Warning: chr() expects parameter 1 to be int, string given in %s on line %d array(8) { [0]=> int(0) diff --git a/ext/standard/tests/strings/chr_variation1.phpt b/ext/standard/tests/strings/chr_variation1.phpt index 85a2219ecb..c962aa0e78 100644 --- a/ext/standard/tests/strings/chr_variation1.phpt +++ b/ext/standard/tests/strings/chr_variation1.phpt @@ -38,11 +38,6 @@ $inputs = array ( -20.5, 1.1234e6, - // array values -/*8*/ array(), - array(0), - array(1, 2), - // boolean values /*11*/ true, false, @@ -53,12 +48,6 @@ $inputs = array ( /*15*/ NULL, null, - // objects -/*17*/ new sample(), - - // resource -/*18*/ $file_handle, - // undefined variable /*19*/ @$undefined_var, @@ -95,29 +84,19 @@ string(2) "ec" -- Iteration 7 -- string(2) "48" -- Iteration 8 -- -string(2) "00" +string(2) "01" -- Iteration 9 -- string(2) "00" -- Iteration 10 -- -string(2) "00" --- Iteration 11 -- string(2) "01" +-- Iteration 11 -- +string(2) "00" -- Iteration 12 -- string(2) "00" -- Iteration 13 -- -string(2) "01" +string(2) "00" -- Iteration 14 -- string(2) "00" -- Iteration 15 -- string(2) "00" --- Iteration 16 -- -string(2) "00" --- Iteration 17 -- -string(2) "00" --- Iteration 18 -- -string(2) "00" --- Iteration 19 -- -string(2) "00" --- Iteration 20 -- -string(2) "00" ===DONE=== |