mirror of
https://github.com/appwrite/appwrite
synced 2026-05-06 06:48:22 +00:00
Fix create execution request filter from previous SDK version
When an older SDK executes a function without passing any data, the data param is unset/null so we need to make sure to handle that case.
This commit is contained in:
parent
4e00f61519
commit
65e2e79457
2 changed files with 7 additions and 1 deletions
|
|
@ -17,7 +17,7 @@ class V16 extends Filter
|
|||
$content['commands'] = $this->getCommands($content['runtime'] ?? '');
|
||||
break;
|
||||
case 'functions.createExecution':
|
||||
$content['body'] = $content['data'];
|
||||
$content['body'] = $content['data'] ?? '';
|
||||
unset($content['data']);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,12 @@ class V16Test extends TestCase
|
|||
'body' => 'Lorem ipsum'
|
||||
],
|
||||
],
|
||||
'no data' => [
|
||||
[],
|
||||
[
|
||||
'body' => ''
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue