diff --git a/browscap.module b/browscap.module index 2fb1202..27b2990 100644 --- a/browscap.module +++ b/browscap.module @@ -167,7 +167,7 @@ function browscap_get_browser($user_agent = NULL) { // Attempt to find a cached user agent // Otherwise store the user agent data in the cache - if ($cache != FALSE && ($cache->created > REQUEST_TIME - 60 * 60 * 24)) { + if (!empty($cache) && ($cache->created > REQUEST_TIME - 60 * 60 * 24)) { $user_agent_properties = $cache->data; } else {