File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -2445,8 +2445,8 @@ PHP_FUNCTION(imagegammacorrect)
2445
2445
}
2446
2446
2447
2447
if ( input <= 0.0 || output <= 0.0 ) {
2448
- php_error_docref (NULL , E_WARNING , "Gamma values should be positive" );
2449
- RETURN_FALSE ;
2448
+ zend_throw_error (NULL , "Gamma values must be positive" );
2449
+ return ;
2450
2450
}
2451
2451
2452
2452
gamma = input / output ;
Original file line number Diff line number Diff line change @@ -6,10 +6,15 @@ if (!function_exists("imagecreatetruecolor")) die("skip");
6
6
?>
7
7
--FILE--
8
8
<?php
9
+
10
+ require __DIR__ . '/func.inc ' ;
11
+
9
12
$ img = imagecreatetruecolor (1 , 1 );
10
- imagegammacorrect ($ img , -1 , 1337 );
13
+
14
+ trycatch_dump (
15
+ fn () => imagegammacorrect ($ img , -1 , 1337 )
16
+ );
17
+
11
18
?>
12
- DONE
13
- --EXPECTF--
14
- Warning: imagegammacorrect(): Gamma values should be positive in %sbug72730.php on line %d
15
- DONE
19
+ --EXPECT--
20
+ !! [Error] Gamma values must be positive
You can’t perform that action at this time.
0 commit comments