我面临的问题是“无法读取响应,或者响应是空的; Zend_Http_Client->请求('GET')DashboardController.php中发生此错误。我不知道如何解决这个问题。
在报告中显示错误消息。
a:5:{i:0;s:45:"Unable to read response, or response is empty";i:1;s:1096:"#0 .../lib/Varien/Http/Client.php(61): Zend_Http_Client->request('GET')
#1 .../app/code/core/Mage/Adminhtml/controllers/DashboardController.php(100): Varien_Http_Client->request('GET')
#2 .../app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_DashboardController->tunnelAction()
#3 .../app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('tunnel')
#4 .../app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#5 .../app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#6 .../app/Mage.php(684): Mage_Core_Model_App->run(Array)
#7 .../index.php(83): Mage::run('', 'store')
#8 {main}";s:3:"url";s:552:".../dashboard/tunnel/key/e49658d07a3b41c7fd32be96b5ae0acf/?ga=eyJjaHQiOiJsYyIsImNoZiI6ImJnLHMsZjRmNGY0fGMsbGcsOTAsZmZmZmZmLDAuMSxlZGVkZWQsMCIsImNobSI6IkIsZjRkNGIyLDAsMCwwIiwiY2hjbyI6ImRiNDgxNCIsImNoZCI6ImU6ampPTzQ0T09BQVZWSEhWVk9PSEhBQWNjQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBIiwiY2h4dCI6IngseSIsImNoeGwiOiIwOnx8fDE0OjAwfHx8MTc6MDB8fHwyMDowMHx8fDIzOjAwfHx8MDI6MDB8fHwwNTowMHx8fDA4OjAwfHx8MTE6MDB8MTp8MHwxfDJ8M3w0fDV8Nnw3fDh8OSIsImNocyI6IjU";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";}
我不知道为什么会发生此错误并且gradle构建失败如何解决此错误。
答案 0 :(得分:1)
DashboardController.php中的某个地方正在使用Zend_Http_Client向某个地方发送请求,可能是它的API调用,而且API没有响应。
您需要在代码中找到此调用并将其包装到try catch语句中并处理错误。
try {
// do request...
} catch (Zend_Http_Client_Exception $e) {
$success = false; //handle error here
}
要获得更具体的答案,您需要附加DashboardController代码