Compatibility fix for PHP 5.3 causing fatal errors in object content