Yes, you're right. The current code doesn't account for optional parameters before ...$params.