Make the old code compatible with modern PHP

This commit is contained in:
2022-01-14 11:52:46 +01:00
parent 87df496efd
commit 0ec0fda566
9 changed files with 283 additions and 242 deletions

View File

@@ -13,7 +13,7 @@ declare(strict_types=1);
* 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);