Fixes #5064

Check for $params['url'] to be set before assigning
Hahaha, sorry I did not see