Skip to content

Commit a9625f8

Browse files
committed
Drop non-well formed numeric strings in array function tests
1 parent 76643cd commit a9625f8

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

ext/standard/tests/array/extract_error.phpt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ echo "*** Testing Error Conditions ***\n";
1010
$arr = array(1);
1111

1212
try {
13-
var_dump( extract($arr, -1 . "wddr") );
13+
var_dump( extract($arr, -1) );
1414
} catch (\ValueError $e) {
1515
echo $e->getMessage() . "\n";
1616
}
@@ -29,10 +29,8 @@ try {
2929
}
3030

3131
?>
32-
--EXPECTF--
32+
--EXPECT--
3333
*** Testing Error Conditions ***
34-
35-
Notice: A non well formed numeric value encountered in %s on line %d
3634
extract(): Argument #2 ($extract_type) must be a valid extract type
3735
extract(): Argument #2 ($extract_type) must be a valid extract type
3836
extract(): Argument #3 ($prefix) is required when using this extract type

ext/standard/tests/array/range_errors.phpt

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,6 @@ try {
6666
echo $e->getMessage(), "\n";
6767
}
6868

69-
try {
70-
var_dump( range(0, 1, "140962482048819216326.24.") );
71-
} catch (\ValueError $e) {
72-
echo $e->getMessage(), "\n";
73-
}
74-
7569
echo "\n-- Testing Invalid steps --\n";
7670
$step_arr = array( "string", NULL, FALSE, "", "\0" );
7771

@@ -83,7 +77,7 @@ foreach( $step_arr as $step ) {
8377
}
8478
}
8579
?>
86-
--EXPECTF--
80+
--EXPECT--
8781
*** Testing error conditions ***
8882

8983
-- Testing ( (low < high) && (step = 0) ) --
@@ -108,9 +102,6 @@ range(): Argument #3 ($step) must not exceed the specified range
108102
range(): Argument #3 ($step) must be of type int|float, string given
109103
range(): Argument #3 ($step) must not exceed the specified range
110104

111-
Notice: A non well formed numeric value encountered in %s on line %d
112-
range(): Argument #3 ($step) must not exceed the specified range
113-
114105
-- Testing Invalid steps --
115106
range(): Argument #3 ($step) must be of type int|float, string given
116107
range(): Argument #3 ($step) must not exceed the specified range

0 commit comments

Comments
 (0)