@@ -1213,14 +1213,14 @@ protected function _callApiCurl($httpmethod, $method, $params = array(), $multip
1213
1213
$ url = $ this ->_getEndpoint ($ method );
1214
1214
$ request_headers = array ();
1215
1215
if ($ httpmethod === 'GET ' ) {
1216
+ if (! $ app_only_auth ) {
1217
+ $ authorization = $ this ->_sign ($ httpmethod , $ url , $ params );
1218
+ }
1216
1219
if (json_encode ($ params ) !== '{} '
1217
1220
&& json_encode ($ params ) !== '[] '
1218
1221
) {
1219
1222
$ url .= '? ' . http_build_query ($ params );
1220
1223
}
1221
- if (! $ app_only_auth ) {
1222
- $ authorization = $ this ->_sign ($ httpmethod , $ url , $ params );
1223
- }
1224
1224
$ ch = curl_init ($ url );
1225
1225
} else {
1226
1226
if ($ multipart ) {
@@ -1324,14 +1324,14 @@ protected function _callApiNoCurl($httpmethod, $method, $params = array(), $mult
1324
1324
$ hostname = parse_url ($ url , PHP_URL_HOST );
1325
1325
$ request_headers = array ();
1326
1326
if ($ httpmethod === 'GET ' ) {
1327
+ if (! $ app_only_auth ) {
1328
+ $ authorization = $ this ->_sign ($ httpmethod , $ url , $ params );
1329
+ }
1327
1330
if (json_encode ($ params ) !== '{} '
1328
1331
&& json_encode ($ params ) !== '[] '
1329
1332
) {
1330
1333
$ url .= '? ' . http_build_query ($ params );
1331
1334
}
1332
- if (! $ app_only_auth ) {
1333
- $ authorization = $ this ->_sign ($ httpmethod , $ url , $ params );
1334
- }
1335
1335
} else {
1336
1336
if ($ multipart ) {
1337
1337
if (! $ app_only_auth ) {
0 commit comments