@@ -12,12 +12,12 @@ class A {}
12
12
$ img = imagecreatetruecolor (1 , 1 );
13
13
try {
14
14
imagesetstyle ($ img , [0 , new A ()]);
15
- } catch (\ValueError $ e ) {
15
+ } catch (\TypeError $ e ) {
16
16
echo $ e ->getMessage () . PHP_EOL ;
17
17
}
18
18
try {
19
19
imagesetstyle ($ img , [0 , PHP_INT_MIN ]);
20
- } catch (\ValueError $ e ) {
20
+ } catch (\TypeError $ e ) {
21
21
echo $ e ->getMessage () . PHP_EOL ;
22
22
}
23
23
try {
31
31
echo $ e ->getMessage () . PHP_EOL ;
32
32
}
33
33
try {
34
- imagecrop ($ img , array ( "x " => PHP_INT_MIN , "y " => 0 , "width " => 0 , "height " => 0 ) );
34
+ imagecrop ($ img , [ "x " => PHP_INT_MIN , "y " => 0 , "width " => 0 , "height " => 0 ] );
35
35
} catch (\ValueError $ e ) {
36
36
echo $ e ->getMessage () . PHP_EOL ;
37
37
}
73
73
}
74
74
?>
75
75
--EXPECTF--
76
- imagesetstyle(): Argument #2 ($style) value must be of type int, A given
77
- imagesetstyle(): Argument #2 ($style) value must be between %i and %d
76
+ imagesetstyle(): Argument #2 ($style) must only have element of type int, A given
77
+ imagesetstyle(): Argument #2 ($style) must have element between %i and %d
78
78
imagefilter(): Argument #5 value must be of type int, A given
79
79
imagefilter(): Argument #5 value must be between 0 and 2147483647
80
80
imagecrop(): Argument #2 ($rectangle) "x" key must be between %i and %d
0 commit comments