diff --git a/src/NextcloudApiContext.php b/src/NextcloudApiContext.php index 379b4e4..90f495c 100644 --- a/src/NextcloudApiContext.php +++ b/src/NextcloudApiContext.php @@ -196,7 +196,8 @@ public function sendRequest(string $verb, string $url, $body = null, array $head } if ($body instanceof TableNode) { $fd = $body->getRowsHash(); - $options['form_params'] = $this->decodeIfIsJsonString($fd); + $options['form_params'] = $fd; + $options['_decode_table_node_json'] = true; } elseif (is_array($body)) { $options['form_params'] = $body; } @@ -488,8 +489,11 @@ public function setAppConfig(string $appId, TableNode $formData): void { protected function parseFormParams(array $options): array { if (!empty($options['form_params'])) { $this->parseTextRcursive($options['form_params']); - $options['form_params'] = $this->decodeIfIsJsonString($options['form_params']); + if (!empty($options['_decode_table_node_json'])) { + $options['form_params'] = $this->decodeIfIsJsonString($options['form_params']); + } } + unset($options['_decode_table_node_json']); return $options; }