Skip to content

Commit

Permalink
Layout: ensure block content is always returned as a string (#45330)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewserong authored Oct 27, 2022
1 parent 419aa29 commit f2f4e21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/block-supports/layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ function gutenberg_get_classnames_from_last_tag( $html ) {
$last_classnames = $tags->get_attribute( 'class' );
}

return $last_classnames;
return (string) $last_classnames;
}

/**
Expand Down Expand Up @@ -445,7 +445,7 @@ function gutenberg_render_layout_support_flag( $block_content, $block ) {
$content->add_class( implode( ' ', $class_names ) );
}

return $content;
return (string) $content;
}

// Register the block support. (overrides core one).
Expand Down

0 comments on commit f2f4e21

Please sign in to comment.