note 126844 deleted from function.imagecopyresampled by cmb

From: Date: Sun, 13 Feb 2022 13:26:33 +0000
Subject: note 126844 deleted from function.imagecopyresampled by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-217616@lists.php.net to get a copy of this message
Note Submitter: Anonymous ---- Note that as of PHP 8.1, you will get deprecated errors if the arguments are floating point. You will save yourself a lot of angst if you cast the arguments: <?php imagecopyresampled( $dst_image, $src_image, (int) $dst_x, (int) $dst_y, (int) $src_x, (int) $src_y, (int) $dst_width, (int) $dst_height, (int) $src_width, (int) $src_height ); ?> You could also have rounded them off, but I think casting them is truer to the original behaviour.

« previous php.notes (#217616) next »