Closed
Description
Description
The following code:
<?php
$image1 = imagecreatetruecolor(1,1);
$image2 = imagecreatetruecolor(1,1);
imagecopyresized($image1, $image2, 1, 1, 1, 1, 0, 0, 1, 1);
Resulted in this output:
Uncaught ValueError: imagecopyresized(): Argument #3 ($dst_x) must be greater than 0 in php shell code:1
But I expected this output instead:
Uncaught ValueError: imagecopyresized(): Argument #7 ($dst_width) must be greater than 0 in php shell code:1
Note that the same applies to argument 8, if you set $dst_width to 1 but keep $dst_height at 0, then it says Argument #4
instead o Argument #8
in the error message.
PHP Version
8.0.20
Operating System
Ubuntu 20.04