@@ -12,12 +12,12 @@ class A {}
1212$ img = imagecreatetruecolor (1 , 1 );
1313try {
1414 imagesetstyle ($ img , [0 , new A ()]);
15- } catch (\ValueError $ e ) {
15+ } catch (\TypeError $ e ) {
1616 echo $ e ->getMessage () . PHP_EOL ;
1717}
1818try {
1919 imagesetstyle ($ img , [0 , PHP_INT_MIN ]);
20- } catch (\ValueError $ e ) {
20+ } catch (\TypeError $ e ) {
2121 echo $ e ->getMessage () . PHP_EOL ;
2222}
2323try {
3131 echo $ e ->getMessage () . PHP_EOL ;
3232}
3333try {
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 ] );
3535} catch (\ValueError $ e ) {
3636 echo $ e ->getMessage () . PHP_EOL ;
3737}
7373}
7474?>
7575--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
7878imagefilter(): Argument #5 value must be of type int, A given
7979imagefilter(): Argument #5 value must be between 0 and 2147483647
8080imagecrop(): Argument #2 ($rectangle) "x" key must be between %i and %d
0 commit comments