Skip to content

Commit

Permalink
Replace \Zend_Http (zf1) for 2.4.6 compatability
Browse files Browse the repository at this point in the history
  • Loading branch information
0m3r committed Mar 22, 2023
1 parent 58dcee6 commit de52169
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Model/Module/LicenseValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,18 @@ public function validate()

try {
$client = $this->curlFactory->create();
$client->setConfig(['maxredirects'=>5, 'timeout'=>30]);
$client->setConfig(['maxredirects' => 5, 'timeout' =>30]);
$client->write(
\Zend_Http_Client::GET,
\Laminas\Http\Request::METHOD_GET,
$this->getUrl($site, [
'key' => $secret,
'suffix' => $suffix,
])
);
$responseBody = $client->read();
$responseBody = \Zend_Http_Response::extractBody($responseBody);
$responseString = $client->read();
$responseParts = preg_split('|(?:\r\n){2}|m', $responseString, 2);
$responseBody = trim($responseParts[1] ?? '');

$client->close();
} catch (\Exception $e) {
return [
Expand Down

1 comment on commit de52169

@ci-swissuplabs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! All tests are passed!

Please sign in to comment.