@@ -1931,11 +1931,11 @@ protected function _detectMedia($method) {
1931
1931
/**
1932
1932
* Detects if API call should use JSON body
1933
1933
*
1934
- * @param string $method The API method to call
1934
+ * @param string $method_template The API method to call
1935
1935
*
1936
1936
* @return bool Whether the method is defined as accepting JSON body
1937
1937
*/
1938
- protected function _detectJsonBody ($ method ) {
1938
+ protected function _detectJsonBody ($ method_template ) {
1939
1939
$ json_bodies = [
1940
1940
'ads/batch/accounts/:account_id/campaigns ' ,
1941
1941
'ads/batch/accounts/:account_id/line_items ' ,
@@ -1947,7 +1947,7 @@ protected function _detectJsonBody($method) {
1947
1947
'media/metadata/create ' ,
1948
1948
'tweets/search/30day/:env '
1949
1949
];
1950
- return in_array ($ method , $ json_bodies );
1950
+ return in_array ($ method_template , $ json_bodies );
1951
1951
}
1952
1952
1953
1953
/**
@@ -2226,7 +2226,7 @@ protected function _callApiPreparationsPost(
2226
2226
$ multipart_boundary = substr ($ params , 2 , $ first_newline - 2 );
2227
2227
$ request_headers [] = 'Content-Type: multipart/form-data; boundary= '
2228
2228
. $ multipart_boundary ;
2229
- } elseif ($ this ->_detectJsonBody ($ method )) {
2229
+ } elseif ($ this ->_detectJsonBody ($ method_template )) {
2230
2230
$ authorization = $ this ->_sign ($ httpmethod , $ url , []);
2231
2231
$ params = json_encode ($ params );
2232
2232
$ request_headers [] = 'Content-Type: application/json ' ;
0 commit comments