}
if ( input <= 0.0 || output <= 0.0 ) {
- php_error_docref(NULL, E_WARNING, "Gamma values should be positive");
- RETURN_FALSE;
+ zend_throw_error(NULL, "Gamma values must be positive");
+ return;
}
gamma = input / output;
?>
--FILE--
<?php
+
+require __DIR__ . '/func.inc';
+
$img = imagecreatetruecolor(1, 1);
-imagegammacorrect($img, -1, 1337);
+
+trycatch_dump(
+ fn() => imagegammacorrect($img, -1, 1337)
+);
+
?>
-DONE
---EXPECTF--
-Warning: imagegammacorrect(): Gamma values should be positive in %sbug72730.php on line %d
-DONE
+--EXPECT--
+!! [Error] Gamma values must be positive