Fixing tests with PHP 5.2