We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 43e3bde + c558f49 commit 931893bCopy full SHA for 931893b
1 file changed
php/media/class-video.php
@@ -242,9 +242,12 @@ public function has_video_block( $source_block ) {
242
if ( 'core/video' === $source_block['blockName'] ) {
243
return true;
244
}
245
- foreach ( $source_block['innerBlocks'] as $block ) {
246
- if ( $this->has_video_block( $block ) ) {
247
- return true;
+
+ if ( ! empty( $source_block['innerBlocks'] ) ) {
+ foreach ( $source_block['innerBlocks'] as $block ) {
248
+ if ( $this->has_video_block( $block ) ) {
249
+ return true;
250
+ }
251
252
253
0 commit comments