Skip to content

Commit bb940b4

Browse files
author
Grace Yim
committed
Little edits to ApiRawRequester.request
1 parent 6301c3c commit bb940b4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/ToopherApi.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ private function request($method, $endpoint, $parameters = array(), $rawRequest
179179
}
180180

181181
$err = json_decode($resultBody, true);
182-
if ($err == NULL) {
182+
if ($err === NULL) {
183183
$jsonError = $this->json_error_to_string(json_last_error());
184184
if (!empty($jsonError))
185185
{
@@ -203,7 +203,8 @@ private function request($method, $endpoint, $parameters = array(), $rawRequest
203203
$decoded = json_decode($resultBody, true);
204204
if ($decoded === NULL) {
205205
$jsonError = $this->json_error_to_string(json_last_error());
206-
if (!empty($jsonError)) {
206+
if (!empty($jsonError))
207+
{
207208
error_log(sprintf('Error parsing response body JSON: %s', $jsonError));
208209
error_log(sprintf('Response body: %s', $result->getBody()));
209210
throw new ToopherRequestException(sprintf('JSON Parsing Error: %s', $jsonError));

0 commit comments

Comments
 (0)