Skip to content

Commit

Permalink
introduce bail check when missing DOMDocument
Browse files Browse the repository at this point in the history
  • Loading branch information
aledesma-godaddy committed Jul 25, 2024
1 parent 4a4e73c commit 4b032e0
Showing 1 changed file with 5 additions and 0 deletions.
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

0 comments on commit 4b032e0

Please sign in to comment.