Skip to content

Commit ee17f94

Browse files
committed
Only encode filters if not empty
1 parent 71668d3 commit ee17f94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/WebhookManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ public function saveWebhook(Webhook $webhook, bool $runValidation = true): bool
197197
'name' => $name,
198198
'class' => $webhook->class,
199199
'event' => $webhook->event,
200-
'filters' => Json::encode($webhook->filters),
200+
'filters' => $webhook->filters ? Json::encode($webhook->filters) : null,
201201
'method' => $webhook->method,
202202
'url' => $webhook->url,
203203
'userAttributes' => $webhook->userAttributes,

0 commit comments

Comments
 (0)