From 785183a6336c83ab21dba076942e460b3e87c992 Mon Sep 17 00:00:00 2001 From: Alex Grintsvayg Date: Wed, 12 Oct 2016 16:29:51 -0400 Subject: [PATCH] fix prefinery bug --- lib/thirdparty/Prefinery.class.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/thirdparty/Prefinery.class.php b/lib/thirdparty/Prefinery.class.php index aed4a53a..5df610e7 100644 --- a/lib/thirdparty/Prefinery.class.php +++ b/lib/thirdparty/Prefinery.class.php @@ -149,15 +149,8 @@ class Prefinery ); } - protected static function decodePrefineryResponse($rawBody, $allowEmptyResponse = true) + protected static function decodePrefineryResponse($data, $allowEmptyResponse = true) { - if (!$rawBody) - { - throw new PrefineryException('Empty cURL response.'); - } - - $data = json_decode($rawBody, true); - if (!$allowEmptyResponse && !$data && $data !== []) { throw new PrefineryException('Received empty or improperly encoded response.');