From 5f5ac8797f62361018a15170efaf7e6a64d7add4 Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Fri, 8 Nov 2024 15:25:48 +0000 Subject: [PATCH] This might not always return a string. --- src/WordPress/Gutenberg.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WordPress/Gutenberg.php b/src/WordPress/Gutenberg.php index 53083ba..340556a 100644 --- a/src/WordPress/Gutenberg.php +++ b/src/WordPress/Gutenberg.php @@ -117,7 +117,7 @@ public static function toBard(array $config, Blueprint $blueprint, Field $field, 'type' => 'gallery', 'images' => collect($block['innerBlocks']) ->filter(fn ($block) => $block['blockName'] === 'core/image') - ->map(function (array $block) use ($config, $field): string { + ->map(function (array $block) use ($config, $field): ?string { $crawler = new Crawler($block['innerHTML']); $url = $crawler->filter('img')->first()->attr('src');