소스 검색

Define default content type

Cerothen 9 년 전
부모
커밋
ca3fcff88f
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      functions.php

+ 1 - 1
functions.php

@@ -239,7 +239,7 @@ function curl_post($url, $data, $headers = array(), $referer='') {
 	curl_setopt($curlReq, CURLOPT_CUSTOMREQUEST, "POST"); 
 	curl_setopt($curlReq, CURLOPT_RETURNTRANSFER, true);
 	// Format Data
-	switch ($headers['Content-Type']) {
+	switch (isset($headers['Content-Type'])?$headers['Content-Type']:'') {
 		case 'application/json': 
 			curl_setopt($curlReq, CURLOPT_POSTFIELDS, json_encode($data));
 			break;