Support modern PHP

This commit is contained in:
2022-01-14 03:34:46 +01:00
parent 84ef36cee0
commit adc56b482b
5 changed files with 166 additions and 123 deletions

View File

@@ -11,7 +11,7 @@
* by Jed Smith <?php $u = "jed"; $d = "bz"; printf("<%s@%s.%s>", $u, $u, $d) ?>
*/
function imagelightnessat($img, $x, $y) {
if (!is_resource($img)) {
if (!$img instanceof \GdImage && !is_resource($img)) {
trigger_error('imagelightnessat(): supplied argument is not a valid '
. 'Image resource', E_USER_WARNING);