PHP 5.3 and Magento

I was installing Magento version on a XAMPP version 1.7.2 instalation for a friend, and I got an error on the very beginning of the installation:

Fatal error: Method Varien_Object::__tostring() cannot take arguments in /magento/lib/Varien/Object.php

With a small research I found out that there is a known issue with Magento and the PHP 5.3. Not a problem though, the solution was only 2 lines of code away. More specifically:

On the file /lib/Varien/Object.php (Line 484)

Change this:

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

To that:

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

and on the file /app/code/core/Mage/Core/Controller/Request/Http.php (Line 274)

Change this:

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

To that:

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