Skip to content

Commit 57eb805

Browse files
committed
Fix GitHub API response in PullModel handling by using getBody() method for apply patch
1 parent 42e3522 commit 57eb805

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

administrator/components/com_patchtester/src/Model/PullModel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ private function retrieveGitHubData(GitHub $github, int $id): stdClass
347347
$this->getState()->get('github_repo'),
348348
$id
349349
);
350-
$pull = json_decode($pullResponse->body, false);
350+
$pull = json_decode($pullResponse->getBody(), false);
351351
} catch (UnexpectedResponse $exception) {
352352
throw new RuntimeException(
353353
Text::sprintf(
@@ -587,7 +587,7 @@ private function applyWithGitHub(int $id): bool
587587
urlencode($pull->head->ref)
588588
);
589589
$contents = json_decode(
590-
$contentsResponse->body,
590+
$contentsResponse->getBody(),
591591
false
592592
);
593593
// In case encoding type ever changes

0 commit comments

Comments
 (0)