Description
The following code:
<?php
$image = imagecreatetruecolor(180, 30);
try {
var_dump(imagefilter($image, -1));
} catch (Throwable $e) {
echo $e::class, ': ', $e->getMessage(), "\n";
}
Resulted in this output:
Fatal error: imagefilter(): Return value must be of type bool, null returned in Unknown on line 0
But I expected this output instead:
ValueError: imagefilter(): Argument #2 ($filter) must be a valid filter
Found by just staring at the code when double-checking #20066
PHP Version
Operating System
No response