Uncaught ValueError: RecursiveDirectoryIterator
-
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)
Viewing 1 replies (of 1 total)
You must be logged in to reply to this topic.