Just another WordPress.com weblog

Fatal error: Method Varien_Object::__tostring() cannot take arguments in xyz on line 488
or
Unknown error (8192): Function split() is deprecated in ….
in the frontend or
Unknown error (8192): Assigning the return value of new by reference is deprecated in …
in the connectManager.

If you update your localhost or your provider update the php version to php5.3 magento 1.3.2.3 or before calls a lot off error messages.

The following steps solved the problems temporary:

1. The fatal error toString at first:

open
lib/Varien/Object.php (line 484)

change this line

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

to

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

As next I disable the deprecated messages.
This error messages are only a advice that this string is not allowed in php6!
So at this time we don’t need this deprecated messages (we using php 5.3).

2. Disable the DEPRECATED messages in Fronend and download manager
open
index.php

change

error_reporting(E_ALL | E_STRICT);

to

error_reporting(E_ALL & E_STRICT & ~E_DEPRECATED);

open
downloader/Maged/Pear.php

change

error_reporting(E_ALL & ~E_NOTICE);

to

error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);

open
lib/Varien/Pear.php

change

error_reporting(E_ALL & ~E_NOTICE);

to

error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);

Notice:
All modifications are temporary!
If you update magento this modifications can to overwrite.
Then you must repeat all this modifications.
Hope varien repair this in the future.

If this information is helpful to you than plz do reply…

Thanks,
– Bijal Bhavsar 🙂

Advertisements

Comments on: "Method Varien_Object::__tostring() in magento due to php version upgrade" (1)

  1. this is very useful …
    this saves my time

    thank you very much

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: