Fatal Error on file upload
-
Hello,
the validation of a file upload of a file triggers an error. The problem is the number of arguments.
In the file ‘contact-form-7/modules/file.php:72’ the file filter is added by
add_filter( 'wpcf7_validate_file', 'wpcf7_file_validation_filter', 10, 3 ); add_filter( 'wpcf7_validate_file*', 'wpcf7_file_validation_filter', 10, 3 );There should be passed 3 arguments.
But in the file ‘contact-form-7/includes/submission.php:366’ there are only two arguments given:
$result = apply_filters( "wpcf7_validate_{$type}", $result, $tag );This triggers the error
PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function wpcf7_file_validation_filter(), 2 passed in /www/public/core/wp-includes/class-wp-hook.php on line 292 and exactly 3 expected in /www/public/app/plugins/contact-form-7/modules/file.php:75.
The topic ‘Fatal Error on file upload’ is closed to new replies.