From eb0fccd1d2bf369c057b47c65f30ebfd160294a2 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 8 Apr 2015 11:54:57 +0800 Subject: [PATCH] fixed content-type check for model --- .../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 6ac31adeee0..3af1fcbad34 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")) < 0 and (is_object($postData) or is_array($postData))) { + if ((isset($headers['Content-Type']) and strpos($headers['Content-Type'], "multipart/form-data") < 0) and (is_object($postData) or is_array($postData))) { $postData = json_encode($this->sanitizeForSerialization($postData)); }