![](/img/trans.png)
[英]PHP (Zend Framework) Code Profiling on Rackspace Cloud Sites
[英]Zend framework 3 and rackspace authenticate() is not working
這段代碼在zf2上運行正常,但是當我遷移到ZF3時,出現了以下錯誤
$user = 'username';
$key = 'secret key';
$rackspace = new ZendService\Rackspace\Files($user,$key);
if ($rackspace->authenticate()) {
printf("Authenticated with token: %s",$rackspace->getToken());
} else {
printf("ERROR: %s",$rackspace->getErrorMsg());
}
文件:zendframework \\ zendservice-rackspace \\ library \\ ZendService \\ Rackspace \\ AbstractRackspace.php:365
消息:在布爾值上調用成員函數getFieldValue()
錯誤來自Rackspace庫,我沒有在任何地方使用getFieldValue()
在庫本身中,有一行導致錯誤
AbstractRackspace.php
的line 401
$this->managementUrl = $result->getHeaders()->get(self::MANAGEMENT_URL)->getFieldValue();
該錯誤歸因於此行,因為標頭中未設置MANAGEMENT_URL
。 我在文件中注釋了這一行,錯誤消失了
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.