From c9f74dd86305d23271ee54a5fdb777fb74cc2aa4 Mon Sep 17 00:00:00 2001 From: Timothy J Warren Date: Thu, 9 Feb 2017 13:45:40 -0500 Subject: [PATCH] Remove 'fix' for issue caused by php.ini setting --- src/API/APIRequestBuilder.php | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/API/APIRequestBuilder.php b/src/API/APIRequestBuilder.php index d3d2a037..0623fef7 100644 --- a/src/API/APIRequestBuilder.php +++ b/src/API/APIRequestBuilder.php @@ -118,7 +118,7 @@ class APIRequestBuilder { public function setFormFields(array $fields): self { $this->setHeader("Content-Type", "application/x-www-form-urlencoded"); - $body = $this->fixBody((new FormBody)->addFields($fields)); + $body = (new FormBody)->addFields($fields); $this->setBody($body); return $this; } @@ -248,21 +248,6 @@ class APIRequestBuilder { $this->request->setUri($url); } - /** - * Unencode the dual-encoded ampersands in the body - * - * This is a dirty hack until I can fully track down where - * the dual-encoding happens - * - * @param FormBody $formBody The form builder object to fix - * @return string - */ - private function fixBody(FormBody $formBody): string - { - $rawBody = Amp\wait($formBody->getBody()); - return html_entity_decode($rawBody, \ENT_HTML5, 'UTF-8'); - } - /** * Reset the class state for a new request *