我正在使用https://github.com/constantcontact/Constant-Contact-PHP-Sample-Contact-Forms中的 PHP 类将新联系人添加到常量联系人列表,但最近我收到了 PHP 错误消息:
A PHP Error was encountered
Severity: Notice
Message: Undefined offset: 1
Filename: cc_class.php
Line Number: 248
A PHP Error was encountered
Severity: Notice
Message: Undefined offset: 1
Filename: cc_class.php
Line Number: 252
这些行看起来像:
(248)
$xml = simplexml_load_string($return);
(252)
}
以及与这两行相关的完整功能:
public function subscriberExists($email = '') {
$call = $this->apiPath.'/contacts?email='.$email;
$return = $this->doServerCall($call);
$xml = simplexml_load_string($return);
$id = $xml->entry->id;
if($id){ return $id; }
else { return false; }
}
但无论如何它都会将数据传递给Constan Contact。
任何线索这些错误消息发生了什么?
谢谢