mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(webhooks): fix crash when headers is null with header auth method
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
bb2cb45340
commit
621c068680
2 changed files with 2 additions and 1 deletions
|
|
@ -32,7 +32,7 @@ class WebhookCall extends QueuedJob {
|
|||
$client = $this->clientService->newClient();
|
||||
$options = [];
|
||||
$options['body'] = json_encode($data);
|
||||
$options['headers'] = $webhookListener->getHeaders();
|
||||
$options['headers'] = $webhookListener->getHeaders() ?? [];
|
||||
try {
|
||||
switch ($webhookListener->getAuthMethodEnum()) {
|
||||
case AuthMethod::None:
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ use OCP\Security\ICrypto;
|
|||
/**
|
||||
* @method void setUserId(string $userId)
|
||||
* @method string getUserId()
|
||||
* @method ?array getHeaders()
|
||||
*/
|
||||
class WebhookListener extends Entity implements \JsonSerializable {
|
||||
/** @var ?string id of the app_api application who added the webhook listener */
|
||||
|
|
|
|||
Loading…
Reference in a new issue