Fix Array to string conversion in PHP > 5.3