Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce bail check when missing DOMDocument #2619

Merged
merged 14 commits into from
Jul 25, 2024
Merged
5 changes: 5 additions & 0 deletions includes/block-migrate/loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ function( WP_Post &$post ) {
return;
}

// Bail if DOMDocument is not available.
if ( ! class_exists( 'DOMDocument' ) ) {
return;
}

// Parse the blocks so we can search them in a standard way.
$parsed_blocks = parse_blocks( $post->post_content );

Expand Down
Loading