From 5d0fd04e25aa64dfba66f79b2d42eac838d68c2b Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Thu, 8 Oct 2015 22:36:16 -0500 Subject: [PATCH] Do curl_init above any curl_setopt, and take it out of that if block since it applies to all types. --- etc/inc/dyndns.class | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etc/inc/dyndns.class b/etc/inc/dyndns.class index 5370c906a8..a2c02087fe 100644 --- a/etc/inc/dyndns.class +++ b/etc/inc/dyndns.class @@ -275,12 +275,13 @@ $realparentif = $this->_dnsRequestIf; } + $ch = curl_init(); + if ($this->_useIPv6 == false) { curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); } if ($this->_dnsService != 'ods' and $this->_dnsService != 'route53 ') { - $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_USERAGENT, $this->_UserAgent); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);