PluginProbe
GetResponse Forms by Optin Cat / 2.0.2
GetResponse Forms by Optin Cat v2.0.2
1.3.4 1.3.5 1.3.6 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2 1.5.0 1.5.1 1.5.2 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6.1 1.6.2 1.6.3 1.7.0 1.7.1 1.7.2 1.8.0 1.8.1 2.0.0 All 36 releases
← All changes | providers/getresponse/GetResponseAPI.class.php +8 -3 1.3.52.0.2 View file →
@@ -13,9 +13,9 @@
13 13 /**
14 14 * GetResponse Class
15 15 * @package GetResponsePHP
16 16 */
17 -class GetResponseApi
17 +class GetResponseApiOptinCat
18 18 {
19 19 /**
20 20 * GetResponse API key
21 21 * http://www.getresponse.com/my_api_key.html
@@ -479,10 +479,15 @@
479 479 $ip = $_SERVER['REMOTE_ADDR'];
480 480
481 481 if (!$this->isValidIP($ip)) $ip = '127.0.0.1';
482 482
483 - $params = array('campaign' => $campaign, 'action' => $action, 'name' => $name,
483 + $params = array('campaign' => $campaign, 'action' => $action,
484 484 'email' => $email, 'cycle_day' => $cycle_day, 'ip' => $ip);
485 +
486 + if(!empty($name)) {
487 + $params['name'] = $name;
488 + }
489 +
485 490 if(!empty($customs)) {
486 491 foreach($customs as $key => $val) $c[] = array('name' => $key, 'content' => $val);
487 492 $params['customs'] = $c;
488 493 }
@@ -586,9 +591,9 @@
586 591 $httpCode = curl_getinfo($handle, CURLINFO_HTTP_CODE);
587 592 if(!(($httpCode == '200') || ($httpCode == '204'))) trigger_error('API call failed. Server returned status code '.$httpCode, E_USER_ERROR);
588 593 curl_close($handle);
589 594
590 - if ($response->error && defined ( 'FCA_EOI_DEBUG' ) ) {
595 + if ($response->error && FCA_EOI_DEBUG ) {
591 596 echo 'Whoops, something is broken: <br>';
592 597 echo '<h2>'.$response->error->message.'</h2>';
593 598 wp_die();
594 599 }