From 4d3c25d819bbb15ed5def4bd9314587ca2faad8f Mon Sep 17 00:00:00 2001 From: joeydehaas Date: Wed, 4 Mar 2026 13:36:15 +0100 Subject: [PATCH] update readonly rule param check --- src/Director/BodyTo/BodyToRule.php | 2 +- src/Entity/RuleInternal.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Director/BodyTo/BodyToRule.php b/src/Director/BodyTo/BodyToRule.php index eeedb22..4271193 100644 --- a/src/Director/BodyTo/BodyToRule.php +++ b/src/Director/BodyTo/BodyToRule.php @@ -29,7 +29,7 @@ public static function build(array $data): Rule ->setTriggerType($data['trigger_type']) ->setConditionData($data['condition_data']) ->setName($data['name']) - ->setReadonly($data['readonly']) + ->setReadonly($data['readonly'] ?? null) ->setDeletedAt($data['deleted_at'] ? self::date($data, 'deleted_at') : null) ->setCreatedAt(self::date($data, 'created_at')) ->setUpdatedAt($data['updated_at'] ? self::date($data, 'updated_at') : null) diff --git a/src/Entity/RuleInternal.php b/src/Entity/RuleInternal.php index e6a9977..c362a75 100644 --- a/src/Entity/RuleInternal.php +++ b/src/Entity/RuleInternal.php @@ -51,7 +51,7 @@ public function setUpdatedAt(?DateTimeImmutable $updatedAt): self /** * @internal */ - public function setReadonly(bool $readonly): self + public function setReadonly(?bool $readonly): self { $this->readonly = $readonly;