Back to Top

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

Updated 19 May 2017

I downloaded a new Wamp server on my computer all things were working fine but when i try to install magento , i got a error like

Method Varien_Object::__tostring() cannot take arguments in C:\wamp\www\magento\lib\Varien\Object.php on line 488

After digging a lot finally i got the solution actually there is a conflict between Magento and higher version of PHP like php 5.3+ . So there is a step by step solution :-

File: /lib/Varien/Object.php (Line 484)

Change from

Searching for an experienced
Magento Company ?
Find out More

public function ___toString(array $arrAttributes = array(), $valueSeparator=’,’)

to this

public function __invoke(array $arrAttributes = array(), $valueSeparator=’,’)

and go to File /app/code/core/Mage/Core/Controller/Request/Http.php (Line 274)

Change from

$host = split(‘:’, $_SERVER[‘HTTP_HOST’]);

To this

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

For more information please refer magento discussion board .enjoy 😉

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Back to Top

Message Sent!

If you have more details or questions, you can reply to the received confirmation email.

Back to Home