Category: Magento — admin @ 8:49 pm — Comments (1)

I have got an error for Magento 1.3.1.1 and PHP 5.3.2:
Fatal error: Method Varien_Object::__tostring() cannot take arguments

PHP 5.3.2-1ubuntu4 with Suhosin-Patch
Magento version: 1.3.1.1

Below solution of this issue:

1. Open lib/Varien/Object.php:484 and replace

public function __toString(array $arrAttributes = array(),
$valueSeparator=',')

with

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

2. Open app/code/core/Mage/Core/Controller/Request/Http.php:199 and replace

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

with

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

Split has been DEPRECATED as of PHP 5.3.0.

1 person has left a comment

#1

hi

This is good post it worked for me
but there is little problem

line Open app/code/core/Mage/Core/Controller/Request/Http.php:199 and replace

i got below code in line no 274

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

guru: wrote on July 1, 2010 - 1:49 pm
You can leave a response, or trackback from your own site.

Write Your Comment

Comment Guidelines: Basic XHTML is allowed (a href, strong, em, code). All line breaks and paragraphs will be generated automatically.

You should have a name, right? 
Your email address, I promised I won't tell it to anyone. 
This is where you type your comments. 
Remember my information for the next time I visit.