A proposed fix for Issue #628

This commit is contained in:
who 2015-04-13 13:14:10 -07:00
parent 444666a365
commit 42829ffb13

View File

@ -73,14 +73,14 @@ class {{classname}} {
$formParams['{{baseName}}'] = {{#isFile}}'@' . {{/isFile}}$this->apiClient->toFormValue(${{paramName}}); $formParams['{{baseName}}'] = {{#isFile}}'@' . {{/isFile}}$this->apiClient->toFormValue(${{paramName}});
}{{/formParams}} }{{/formParams}}
{{#bodyParams}}// body params {{#bodyParams}}// body params
$body = null; $_tempBody = null;
if (isset(${{paramName}})) { if (isset(${{paramName}})) {
$body = ${{paramName}}; $_tempBody = ${{paramName}};
}{{/bodyParams}} }{{/bodyParams}}
// for model (json/xml) // for model (json/xml)
if (isset($body)) { if (isset($_tempBody)) {
$httpBody = $body; // $body is the method argument, if present $httpBody = $_tempBody; // $_tempBody is the method argument, if present
} }
// for HTTP post (form) // for HTTP post (form)