a few words about web development

Magento Error: Method Varien_Object::__tostring() cannot take arguments

Another straight to the point solution
If you encountered a bug in Magento that says:
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 text:
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 text:
$host = split(‘:’, $_SERVER['HTTP_HOST']);

Change to:
$host = explode(‘:’, $_SERVER['HTTP_HOST']);

Comments