From 164a01ed125ea1c34b174c5d744036f4edcc9e73 Mon Sep 17 00:00:00 2001 From: who Date: Wed, 15 Apr 2015 16:17:21 -0700 Subject: [PATCH] Fixing a bug which was preventing payloads to serialize into JSON --- .../swagger-codegen/src/main/resources/php/APIClient.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/swagger-codegen/src/main/resources/php/APIClient.mustache b/modules/swagger-codegen/src/main/resources/php/APIClient.mustache index 3620e671952..5cfb953002b 100644 --- a/modules/swagger-codegen/src/main/resources/php/APIClient.mustache +++ b/modules/swagger-codegen/src/main/resources/php/APIClient.mustache @@ -94,7 +94,7 @@ class APIClient { $headers[] = $this->headerName . ": " . $this->headerValue; } - if ((isset($headers['Content-Type']) and strpos($headers['Content-Type'], "multipart/form-data") === FALSE) and (is_object($postData) or is_array($postData))) { + if ((isset($headerName['Content-Type']) and strpos($headerName['Content-Type'], "multipart/form-data") === FALSE) and (is_object($postData) or is_array($postData))) { $postData = json_encode($this->sanitizeForSerialization($postData)); }