| @@ -151,9 +151,10 @@ | ||
| 151 | 151 | |
| 152 | 152 | // Run through the actions that are typically taken on the_content. |
| 153 | 153 | $content = _wp_apply_block_content_filters( $content, "template_part_{$area}", $seen_ids, $template_part_id ); |
| 154 | 154 | |
| 155 | - if ( empty( $attributes['tagName'] ) || tag_escape( $attributes['tagName'] ) !== $attributes['tagName'] ) { | |
| 155 | + $tag_name = $attributes['tagName'] ?? null; | |
| 156 | + if ( empty( $tag_name ) || ! is_string( $tag_name ) || tag_escape( $tag_name ) !== $tag_name ) { | |
| 156 | 157 | $area_tag = 'div'; |
| 157 | 158 | if ( $area_definition && isset( $area_definition['area_tag'] ) ) { |
| 158 | 159 | $area_tag = $area_definition['area_tag']; |
| 159 | 160 | } |