curl_setopt_array($ch, $opts);
$result = curl_exec($ch);if ($result === false && empty($opts[CURLOPT_IPRESOLVE])) {
$matches = array();
$regex = '/Failed to connect to ([^:].*): Network is unreachable/';
if (preg_match($regex, curl_error($ch), $matches)) {
if (strlen(@inet_pton($matches[1])) === 16) {
if ($jfbcConfigModel->getSetting('facebook_display_errors'))
{
$app = JFactory::getApplication();
$app->enqueueMessage('Invalid IPv6 configuration on server, Please disable or get native IPv6 on your server.');
}
self::$CURL_OPTS[CURLOPT_IPRESOLVE] = CURL_IPRESOLVE_V4;
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$result = curl_exec($ch);
}
}
}Join our newsletter to get alerts for Joomla releases, tips and tricks and extension updates.
