]> granicus.if.org Git - php/commitdiff
Drop non-well formed numeric strings in array function tests
authorGeorge Peter Banyard <girgias@php.net>
Sun, 28 Jun 2020 16:03:10 +0000 (18:03 +0200)
committerGeorge Peter Banyard <girgias@php.net>
Sun, 28 Jun 2020 17:29:37 +0000 (19:29 +0200)
ext/standard/tests/array/extract_error.phpt
ext/standard/tests/array/range_errors.phpt

index 40f517fb4d7ed0e9db6378bdc440dedae0460220..e5b057222ff0f609df9364841ba18dcf9c9036ec 100644 (file)
@@ -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
index 9b86c32177b35a83c865b3af355943b6f0e18bfc..dd8b69a82a663d3ebc31dba6ef5cb16ca49d0d35 100644 (file)
@@ -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