Skip to content

Commit

Permalink
Ensure this is an array to handle isset() behavior in 5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbachhuber committed Apr 27, 2018
1 parent d63620b commit 75e7234
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ function gutenberg_add_block_format_to_post_content( $response, $post, $request
}

$response_data = $response->get_data();
if ( isset( $response_data['content']['raw'] ) ) {
if ( is_array( $response_data['content'] ) && isset( $response_data['content']['raw'] ) ) {
$response_data['content']['block_format'] = gutenberg_content_block_version( $response_data['content']['raw'] );
$response->set_data( $response_data );
}
Expand Down

0 comments on commit 75e7234

Please sign in to comment.