Fixed PHP-deprecated functionality.