• Resolved visionova

    (@visionova)


    The wpcf7-redirect plugin (in the delete_associated_files function) retrieves the path to the file to delete from the post’s metadata (probably something like _uploaded_file_path or similar). If the CF7 form has an upload field that allows multiple files, that metadata is saved as an array of paths instead of a single string. The wpcf7-redirect code, however, doesn’t handle this case and passes the array directly to file_exists(), which crashes because it expects only a string.
    StackTrace:
    [24-Jul-2026 07:19:39 UTC] PHP Fatal error: Uncaught TypeError: file_exists(): Argument #1 ($filename) must be of type string, array given in /home/se5ijlj/public_html/wp-admin/includes/class-wp-filesystem-direct.php:438
    Stack trace: 0 /home/se5ijlj/public_html/wp-admin/includes/class-wp-filesystem-direct.php(438): file_exists() 1 /home/se5ijlj/public_html/wp-content/plugins/wpcf7-redirect/classes/class-wpcf7r-save-files.php(98): WP_Filesystem_Direct->exists() 2 /home/se5ijlj/public_html/wp-includes/class-wp-hook.php(341): WPCF7R_Save_File->delete_associated_files() 3 /home/se5ijlj/public_html/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters() 4 /home/se5ijlj/public_html/wp-includes/plugin.php(522): WP_Hook->do_action() 5 /home/se5ijlj/public_html/wp-includes/post.php(3825): do_action()

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter visionova

    (@visionova)

    Steps to reproduce the bug:

    Create a form with a file_upload field that allows more than a file
    Add the action “Save lead” to the form
    Fill the form
    Put the filled form entry in the basket.
    Try to empty the basket

    • This reply was modified 2 weeks, 1 day ago by visionova.
    Plugin Support Poonam Namdev

    (@poonam9)

    Hi @visionova,

    Thank you for reporting the issue. We’ve forwarded it to our development team for further investigation.

    ​Let us know if we can help with anything else.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.