Fixes #5064

Check for $params['url'] to be set before assigning
 isset($url) ?: $params['url'] = null;