Skip to content

Commit

Permalink
Fixed issue: Quick translation not working if server is using IPv6
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Feb 21, 2024
1 parent a2177db commit 49086a4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vendor/gtranslate-api/GTranslate.php
Expand Up @@ -289,6 +289,8 @@ private function requestHttp($url)
private function requestCurl($url)
{
$ch = curl_init();
// CGoogle translate API requires IPv4
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
curl_setopt($ch, CURLOPT_URL, $this->url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_REFERER, $this->http_referer);
Expand Down

0 comments on commit 49086a4

Please sign in to comment.