"i" var might not be assigned if portal ips is null