Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion app/RemoteSite/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use GuzzleHttp\Psr7\Response;
use GuzzleHttp\Psr7\Utils;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Str;
use Psr\Http\Message\RequestInterface;

/**
Expand Down Expand Up @@ -163,9 +164,13 @@ protected function performHttpRequest(

protected function decodeResponse(Response $response, Request $request): array
{
// Work around debug bar issue https://github.com/joomla/joomla-cms/issues/47597
$body = Str::of((string) $response->getBody())
->before('<!-- Could not find template &quot;system&quot;. (500 Whoops, looks like something went wrong.) -->');

// Decode
$data = json_decode(
(string) $response->getBody(),
$body->toString(),
true,
512,
JSON_THROW_ON_ERROR
Expand Down
Loading