mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Drop non-well formed numeric strings in array function tests
This commit is contained in:
parent
76643cd4f3
commit
a9625f8b35
2 changed files with 3 additions and 14 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue