Skip to content

Commit 5c167ae

Browse files
authored
🩹 Fix potential exception on the ACF health page (#337)
1 parent 942c931 commit 5c167ae

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Block.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ public function settings(): Collection
653653
'supports' => $this->getSupports(),
654654
'textdomain' => $this->getTextDomain(),
655655
'acf_block_version' => $this->blockVersion,
656-
'apiVersion' => $this->getApiVersion(),
656+
'api_version' => $this->getApiVersion(),
657657
'validate' => $this->validate,
658658
'use_post_meta' => $this->usePostMeta,
659659
'render_callback' => function (
@@ -707,6 +707,7 @@ public function toJson(): string
707707
{
708708
$settings = $this->settings()
709709
->put('name', $this->namespace)
710+
->put('apiVersion', $this->getApiVersion())
710711
->put('acf', [
711712
'blockVersion' => $this->blockVersion,
712713
'mode' => $this->mode,
@@ -716,6 +717,7 @@ public function toJson(): string
716717
'validate' => $this->validate,
717718
])
718719
->forget([
720+
'api_version',
719721
'acf_block_version',
720722
'align',
721723
'alignContent',

0 commit comments

Comments
 (0)