Php SUPEE 6788修补程序Magento后无法发送标头错误

Php SUPEE 6788修补程序Magento后无法发送标头错误,php,json,magento,Php,Json,Magento,我在Magento 1.9.1.0上使用了一个模板,在使用SUPEE 6788进行修补后,我的system.log中出现了以下错误: 2016-04-26T00:50:23+00:00 DEBUG (7): Cannot send headers; headers already sent in /usr/share/nginx/html/app/code/community/Ves/Tabs/controllers/IndexController.php, line 140 2016-04-2

我在Magento 1.9.1.0上使用了一个模板,在使用SUPEE 6788进行修补后,我的system.log中出现了以下错误:

2016-04-26T00:50:23+00:00 DEBUG (7): Cannot send headers; headers already sent in /usr/share/nginx/html/app/code/community/Ves/Tabs/controllers/IndexController.php, line 140
2016-04-26T00:50:23+00:00 DEBUG (7): HEADERS ALREADY SENT: <pre>[0] /usr/share/nginx/html/app/code/core/Mage/Core/Controller/Response/Http.php:52
[1] /usr/share/nginx/html/lib/Zend/Controller/Response/Abstract.php:771
[2] /usr/share/nginx/html/app/code/core/Mage/Core/Controller/Response/Http.php:84
[3] /usr/share/nginx/html/app/code/core/Mage/Core/Controller/Varien/Front.php:184
[4] /usr/share/nginx/html/app/code/core/Mage/Core/Model/App.php:354
[5] /usr/share/nginx/html/app/Mage.php:684
[6] /usr/share/nginx/html/index.php:87
我认为json的调用方式导致了这种错误。我怎样才能解决这个问题


提前感谢。

我从上述问题中了解到,您希望对数据进行编码并在程序中的某个地方使用它

如果上述情况属实,则可以尝试以下解决方案

$this->getResponse()->clearHeaders()->setHeader('content-type','application/json',true);

$this->getResponse()->setBody(json_encode($json))
您是否检查了某些文件的关闭php标记之后或打开标记之前的空格?也看看这个@severinolorillajr我验证了每个文件,但没有成功。@Hallan请注意,由于您使用的是社区模块,您可能应该在第一时间向Ves支持团队寻求帮助。您试图用上述代码实现什么。您是否需要将编码数据发送到某个地方进行响应?你能跟我说清楚吗me@severinolorillajr我按照本页末尾的sagar umaretiya答案链接中的说明进行操作。非常感谢你,谢谢你,萨加尔!我试了第二行。我更换了“回音”线路,解决了我的问题。嘿,哈兰。我很高兴听到这个消息。去欢呼吧!
echo Mage::helper('core')->jsonEncode( $json );