diff --git a/src/Schema/Types/BlockTypes.php b/src/Schema/Types/BlockTypes.php index f5aeba72..dd58c462 100644 --- a/src/Schema/Types/BlockTypes.php +++ b/src/Schema/Types/BlockTypes.php @@ -262,6 +262,10 @@ public function __construct() { $registry = Registry::get_registry(); + if ( empty( $registry ) || ! is_array( $registry ) ) { + return; + } + foreach ( $registry as $block_name => $block_type ) { $type_names[] = self::register_block_type( $block_type, $type_registry ); }