From d5a7b58c488b32d17ade64782e0ebb140ff5b1c0 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Thu, 24 Jun 2021 01:52:43 +0530 Subject: [PATCH 1/2] feat: pass empty string instead of null in functions worker --- app/workers/functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/workers/functions.php b/app/workers/functions.php index 5299970e56..ffc786a624 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -145,6 +145,7 @@ class FunctionsV1 extends Worker $event = $this->args['event'] ?? ''; $scheduleOriginal = $this->args['scheduleOriginal'] ?? ''; $eventData = (!empty($this->args['eventData'])) ? json_encode($this->args['eventData']) : ''; + var_dump($eventData); $data = $this->args['data'] ?? ''; $userId = $this->args['userId'] ?? ''; $jwt = $this->args['jwt'] ?? ''; @@ -353,7 +354,7 @@ class FunctionsV1 extends Worker \array_walk($vars, function (&$value, $key) { $key = $this->filterEnvKey($key); - $value = \escapeshellarg((empty($value)) ? 'null' : $value); + $value = \escapeshellarg((empty($value)) ? '' : $value); $value = "--env {$key}={$value}"; }); From fdd389a17adc9b92ba5cdd2cf245127868795e22 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Thu, 24 Jun 2021 01:55:27 +0530 Subject: [PATCH 2/2] feat: remove var_dump() --- app/workers/functions.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/workers/functions.php b/app/workers/functions.php index ffc786a624..95fa51415e 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -145,7 +145,6 @@ class FunctionsV1 extends Worker $event = $this->args['event'] ?? ''; $scheduleOriginal = $this->args['scheduleOriginal'] ?? ''; $eventData = (!empty($this->args['eventData'])) ? json_encode($this->args['eventData']) : ''; - var_dump($eventData); $data = $this->args['data'] ?? ''; $userId = $this->args['userId'] ?? ''; $jwt = $this->args['jwt'] ?? '';