that line looks good.. well, it MUST be since it works on a ton of boards

you could mickey around with it and try
$homepage = "http://{$homepage}";
or
$homepage = 'http://'.$homepage;
but i'd suspect you'll run into other places where the 'same' sort of completely valid thing occurs and causes you headaches..