@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | const USERAGENT = 'Jodel/4.34.2 Dalvik/2.1.0 (Linux; U; Android 5.1.1; )'; |
9 | 9 | const CLIENT_TYPE = 'android_4.34.2'; |
10 | 10 | |
11 | - private $accessToken = null; |
|
11 | + private $accessToken = NULL; |
|
12 | 12 | private $payLoad; |
13 | 13 | public $expects = ''; |
14 | 14 | public $version = 'v2'; |
@@ -72,37 +72,37 @@ discard block |
||
72 | 72 | } |
73 | 73 | switch ($result->status_code) { |
74 | 74 | case 200: |
75 | - $result = json_decode($result->body, true); |
|
75 | + $result = json_decode($result->body, TRUE); |
|
76 | 76 | break; |
77 | 77 | case 204: |
78 | 78 | $result = "Success"; |
79 | 79 | break; |
80 | 80 | case 400: |
81 | 81 | error_log('Error 400 - Fehlerhafte Anfrage'); |
82 | - $result = json_decode($result->body, true); |
|
82 | + $result = json_decode($result->body, TRUE); |
|
83 | 83 | break; |
84 | 84 | case 401: |
85 | 85 | error_log('Error 401 - Unauthorized'); |
86 | - $result = json_decode($result->body, true); |
|
86 | + $result = json_decode($result->body, TRUE); |
|
87 | 87 | break; |
88 | 88 | case 404: |
89 | 89 | error_log('Error 404 - Es wurde bereits gevoted'); |
90 | - $result = json_decode($result->body, true); |
|
90 | + $result = json_decode($result->body, TRUE); |
|
91 | 91 | case 477: |
92 | 92 | error_log('Error 477 - Signing failed'); |
93 | - $result = json_decode($result->body, true); |
|
93 | + $result = json_decode($result->body, TRUE); |
|
94 | 94 | break; |
95 | 95 | case 429: |
96 | - error_log('Error 429 - Too Many Requests' . print_r(json_decode($result->body, true), true)); |
|
96 | + error_log('Error 429 - Too Many Requests' . print_r(json_decode($result->body, TRUE), TRUE)); |
|
97 | 97 | exit("Error 429: Too Many Requests"); |
98 | 98 | break; |
99 | 99 | case 403: |
100 | - error_log('Error 403 - Access denied:' . print_r(json_decode($result->body, true), true)); |
|
100 | + error_log('Error 403 - Access denied:' . print_r(json_decode($result->body, TRUE), TRUE)); |
|
101 | 101 | exit("Error 403: Access denied"); |
102 | 102 | break; |
103 | 103 | default: |
104 | 104 | error_log('Error '.$result->status_code.' - Unauthorized'); |
105 | - $result = json_decode($result->body, true); |
|
105 | + $result = json_decode($result->body, TRUE); |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | //important for account refresh |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | */ |
125 | 125 | private function getSignHeaders() |
126 | 126 | { |
127 | - if($this->getAccessToken() == null) { |
|
127 | + if($this->getAccessToken() == NULL) { |
|
128 | 128 | $payload_accessToken = ""; |
129 | 129 | } |
130 | 130 | else { |