• robert_t_taylor

    (@robert_t_taylor)


    I was able to get past an error in the archive_dir() function by adding the following right before the “// Create recursive directory iterator.” comment:

    // Guard clause: Ensure the path is not empty and exists before iterating.
    // This prevents a Fatal ValueError in PHP 8.0+.
    if ( empty( $root_path ) || ! is_string( $root_path ) ) {
    error_log( 'SiteGround Migrator: archive_dir got empty directory; aborting. Destination: ' . var_export( $root_path, true ) );
    return false;
    }

    if ( ! is_dir( $root_path ) ) {
    error_log( 'SiteGround Migrator: archive_dir directory does not exist: ' . $root_path );
    return false;
    }

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support aleksandardimitrov

    (@aleksandardimitrov)

    Hello,

    Thank you for the detailed report and for sharing your fix for the ValueError: RecursiveDirectoryIterator in the archive_dir() function.

    I have forwarded these details to our developers so they can investigate the root cause and implement an official fix. We appreciate you bringing this to our attention.

    Best Regards,

    Aleksandar Dimitrov

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.