Re: com php-src: Make chr ZPP failure message consistent with ext/standard: ext/standard/string.c
ext/standard/tests/array/array_filter_variation9.phpt ext/standard/tests/strings/chr_error.phpt ext/standard/tests/strings/chr_ord.phpt
ext/standard/tests/strings/chr_variation1.phpt

From: Date: Sun, 19 May 2019 06:58:30 +0000
Subject: Re: com php-src: Make chr ZPP failure message consistent with ext/standard: ext/standard/string.c
ext/standard/tests/array/array_filter_variation9.phpt ext/standard/tests/strings/chr_error.phpt ext/standard/tests/strings/chr_ord.phpt
ext/standard/tests/strings/chr_variation1.phpt
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-106237@lists.php.net to get a copy of this message
Hi Gabriel, I have 3 new chr/ord related tests failing this morning on master. I suspect they are related to this commit: https://revive.beccati.com/bamboo/browse/PHP-SRC-1953/test Cheers On 18/05/2019 20:59, Gabriel Caruso wrote:
Commit:    714d9fc358640069bda5540c2b1136a6241c4c94
Author:    Gabriel Caruso <carusogabriel34@gmail.com>         Wed, 8 May 2019 16:42:02 -0300
Parents: 256100a9b57113915c4ea7f203a9d094eaa129a0 Branches: PHP-7.4 master
Link:       http://git.php.net/?p=php-src.git;a=commitdiff;h=714d9fc358640069bda5540c2b1136a6241c4c94
Log: Make chr ZPP failure message consistent with ext/standard Changed paths: M ext/standard/string.c M ext/standard/tests/array/array_filter_variation9.phpt M ext/standard/tests/strings/chr_error.phpt D ext/standard/tests/strings/chr_ord.phpt M ext/standard/tests/strings/chr_variation1.phpt Diff: diff --git a/ext/standard/string.c b/ext/standard/string.c index 446de00..e0141ff 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -2792,11 +2792,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 ed89d13..a6f5789 100644 --- a/ext/standard/tests/array/array_filter_variation9.phpt +++ b/ext/standard/tests/array/array_filter_variation9.phpt @@ -45,6 +45,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_error.phpt b/ext/standard/tests/strings/chr_error.phpt index d5fb974..4d59554 100644 Binary files a/ext/standard/tests/strings/chr_error.phpt and b/ext/standard/tests/strings/chr_error.phpt differ diff --git a/ext/standard/tests/strings/chr_ord.phpt b/ext/standard/tests/strings/chr_ord.phpt deleted file mode 100644 index be0b1a3..0000000 Binary files a/ext/standard/tests/strings/chr_ord.phpt and /dev/null differ diff --git a/ext/standard/tests/strings/chr_variation1.phpt b/ext/standard/tests/strings/chr_variation1.phpt index 85a2219..c962aa0 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===
-- Matteo Beccati Development & Consulting - http://www.beccati.com/

« previous php.cvs (#106237) next »