现在的位置: 首页 > 综合 > 正文

Magento Error: Method Varien_Object::__tostring() cannot take arguments(针对magento1.2-1.3之间)

2012年08月01日 ⁄ 综合 ⁄ 共 587字 ⁄ 字号 评论关闭

If you encountered a bug in Magento that says:

view source

print?

1
Method Varien_Object::__tostring() cannot take arguments

and you have PHP 5.3 or newer then you have 2 options:
1) downgrade to PHP 2.9
2) fix the bugs
If downgrading is not possible try doing these changes in Magento files:

File:
/lib/Varien/Object.php
Original:
public function ___toString(array $arrAttributes = array(), $valueSeparator=’,')
Change to:
public function __invoke(array $arrAttributes = array(), $valueSeparator=’,')

File:
/app/code/core/Mage/Core/Controller/Request/Http.php
Original:
$host = split(‘:’, $_SERVER['HTTP_HOST']);
Change to:
$host = explode(‘:’, $_SERVER['HTTP_HOST']);

抱歉!评论已关闭.