From: George Peter Banyard Date: Sun, 28 Jun 2020 16:03:10 +0000 (+0200) Subject: Drop non-well formed numeric strings in array function tests X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a9625f8b35e2384903b4bc099a884156704bc8ab;p=php Drop non-well formed numeric strings in array function tests --- diff --git a/ext/standard/tests/array/extract_error.phpt b/ext/standard/tests/array/extract_error.phpt index 40f517fb4d..e5b057222f 100644 --- a/ext/standard/tests/array/extract_error.phpt +++ b/ext/standard/tests/array/extract_error.phpt @@ -10,7 +10,7 @@ echo "*** Testing Error Conditions ***\n"; $arr = array(1); try { - var_dump( extract($arr, -1 . "wddr") ); + var_dump( extract($arr, -1) ); } catch (\ValueError $e) { echo $e->getMessage() . "\n"; } @@ -29,10 +29,8 @@ try { } ?> ---EXPECTF-- +--EXPECT-- *** Testing Error Conditions *** - -Notice: A non well formed numeric value encountered in %s on line %d extract(): Argument #2 ($extract_type) must be a valid extract type extract(): Argument #2 ($extract_type) must be a valid extract type extract(): Argument #3 ($prefix) is required when using this extract type diff --git a/ext/standard/tests/array/range_errors.phpt b/ext/standard/tests/array/range_errors.phpt index 9b86c32177..dd8b69a82a 100644 --- a/ext/standard/tests/array/range_errors.phpt +++ b/ext/standard/tests/array/range_errors.phpt @@ -66,12 +66,6 @@ try { echo $e->getMessage(), "\n"; } -try { - var_dump( range(0, 1, "140962482048819216326.24.") ); -} catch (\ValueError $e) { - echo $e->getMessage(), "\n"; -} - echo "\n-- Testing Invalid steps --\n"; $step_arr = array( "string", NULL, FALSE, "", "\0" ); @@ -83,7 +77,7 @@ foreach( $step_arr as $step ) { } } ?> ---EXPECTF-- +--EXPECT-- *** Testing error conditions *** -- Testing ( (low < high) && (step = 0) ) -- @@ -108,9 +102,6 @@ range(): Argument #3 ($step) must not exceed the specified range range(): Argument #3 ($step) must be of type int|float, string given range(): Argument #3 ($step) must not exceed the specified range -Notice: A non well formed numeric value encountered in %s on line %d -range(): Argument #3 ($step) must not exceed the specified range - -- Testing Invalid steps -- range(): Argument #3 ($step) must be of type int|float, string given range(): Argument #3 ($step) must not exceed the specified range