--- mobile_tools.module	2011-09-12 13:34:02.000000000 -0400
+++ mobile_tools.module.modified	2011-09-12 13:34:19.000000000 -0400
@@ -461,6 +461,7 @@
     return 'desktop';
   }
   $host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];
+	if(!$host) return 'desktop';
     // first check if the url is a m.* or .mobi url. This is robust
   $server_domain_elements = explode('.', $host);
   if (count($server_domain_elements) > 0 ) {
