PHP 8 is supposed to throw here.
ZEND_PARSE_PARAMETERS_END();
if (mode == FROM_PATH && CHECK_NULL_PATH(input, input_len)) {
- php_error_docref(NULL, E_WARNING, "Invalid path");
- return;
+ zend_argument_type_error(1, "must not contain any null bytes");
+ RETURN_THROWS();
}
if (argc == 2) {
var_dump(getimagesize("/tmp/a.png\0xx"));
?>
--EXPECTF--
-Warning: getimagesize(): Invalid path in %s on line %d
-NULL
+Fatal error: Uncaught TypeError: getimagesize(): Argument #1 ($image_path) must not contain any null bytes in %s:%d
+Stack trace:
+%a