Skip to content

Commit

Permalink
handle json decoding error
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasbenedetto committed Mar 20, 2024
1 parent b6a5e4b commit f05273b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/class-wp-import.php
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,14 @@ function process_posts() {
break;

case 'wp_font_face':
$postdata = $this->process_font_face( $postdata );
$postdata = $this->process_font_face( $postdata );

Check warning on line 748 in src/class-wp-import.php

View workflow job for this annotation

GitHub Actions / PHPCS check

Equals sign not aligned correctly; expected 1 space but found 2 spaces

if ( is_wp_error( $postdata ) ) {
// Assing the error to $post_id so it is handled later.
$post_id = $postdata;
break;
}

$post_id = wp_insert_post( $postdata, true );
$post['postmeta'] = $this->process_font_face_postmeta( $post['postmeta'], $postdata );
break;
Expand Down

0 comments on commit f05273b

Please sign in to comment.