问题 I. PHP Notice: Only variable references should be returned by reference
在调试函数时
php
function &GetSellerList($request) { 函数
$request->setVersion(EBAY_WSDL_VERSION); this
return ($res = & $this->call('GetSellerList', $request);); spa
} 调试
返回错误:PHP Notice: Only variable references should be returned by reference in /projects/ebay_api/tradding_api/EbatNsSamples/EbatNs/EbatNs_ServiceProxy.php on line 979
修改成:
rem
function &GetSellerList($request) { function
$request->setVersion(EBAY_WSDL_VERSION); List
$res = & $this->call('GetSellerList', $request);
return ($res);
}
便可.
问题 II. PHP Fatal error: Call-time pass-by-reference has been removed
运行代码返回错误:[30-Jan-2013 10:51:57 UTC] PHP Fatal error: Call-time pass-by-reference has been removed in /projects/ebay_api/tradding_api/EbatNsSamples/EbatNs/EbatNs_Client.php on line 245
由于PHP5.4语法改变,将245行代码
$this->_parser = &new EbatNs_ResponseParser( &$this, $tns, $this->_parserOptions );
修改成:
$this->_parser = &new EbatNs_ResponseParser( $this, $tns, $this->_parserOptions );
便可.