1
0
Fork 0
mirror of synced 2024-06-26 18:20:43 +12:00

feat: pass empty string instead of null in functions worker

This commit is contained in:
Christy Jacob 2021-06-24 01:52:43 +05:30
parent a2c4dac366
commit d5a7b58c48

View file

@ -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}";
});