{"action":"opened","issue":{"url":"https://api.github.com/repos/browscap/browscap-php/issues/88","labels_url":"https://api.github.com/repos/browscap/browscap-php/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/browscap/browscap-php/issues/88/comments","events_url":"https://api.github.com/repos/browscap/browscap-php/issues/88/events","html_url":"https://github.com/browscap/browscap-php/issues/88","id":84200893,"number":88,"title":"[3.x] Browscap::update() does nothing with new remote cache","user":{"login":"fyrye","id":302306,"avatar_url":"https://avatars.githubusercontent.com/u/302306?v=3","gravatar_id":"","url":"https://api.github.com/users/fyrye","html_url":"https://github.com/fyrye","followers_url":"https://api.github.com/users/fyrye/followers","following_url":"https://api.github.com/users/fyrye/following{/other_user}","gists_url":"https://api.github.com/users/fyrye/gists{/gist_id}","starred_url":"https://api.github.com/users/fyrye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fyrye/subscriptions","organizations_url":"https://api.github.com/users/fyrye/orgs","repos_url":"https://api.github.com/users/fyrye/repos","events_url":"https://api.github.com/users/fyrye/events{/privacy}","received_events_url":"https://api.github.com/users/fyrye/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-02T20:37:39Z","updated_at":"2015-06-02T20:37:39Z","closed_at":null,"body":"Effectively you should be able to perform a fetch+convert or update according to the documentation.\r\n\r\nAccording to the update method, it will never retrieve a new remote file if a cache does not already exist.\r\nhttps://github.com/browscap/browscap-php/blob/3.x/src/Browscap.php#L408\r\n\r\nif `$cachedTime` is null, it would be equal to 0\r\nSince $remoteTime <= null is always false, so it will never load.\r\n\r\nThe line should read\r\n```php\r\nif ($cachedTime !== null && $remoteTime <= $cachedTime)\r\n```\r\nor to catch 0, null, or false\r\n\r\n```php\r\nif (!empty($cachedTime) && $remoteTime <= $cachedTime)\r\n```"}}