Skip to content

Commit 6df0508

Browse files
authored
Merge pull request #1321 from robertgray-topflight/patch-1
Fix undefined array key “id” warning in filter_image_block_render_block
2 parents 9e83fe2 + 2d22cd0 commit 6df0508

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎php/media/class-filter.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ public function catch_media_templates_maybe() {
729729
* @return string
730730
*/
731731
public function filter_image_block_render_block( $block_content, array $block ) {
732-
if ( 'core/image' === $block['blockName'] && ! empty( $block['attrs']['overwrite_transformations'] ) ) {
732+
if ( 'core/image' === $block['blockName'] && ! empty( $block['attrs']['overwrite_transformations'] ) && ! empty( $block['attrs']['id'] ) ) {
733733
$block_content = str_replace( 'wp-image-' . $block['attrs']['id'], 'wp-image-' . $block['attrs']['id'] . ' cld-overwrite', $block_content );
734734
}
735735

0 commit comments

Comments
 (0)