{"action":"created","issue":{"url":"https://api.github.com/repos/anchorcms/anchor-cms/issues/795","labels_url":"https://api.github.com/repos/anchorcms/anchor-cms/issues/795/labels{/name}","comments_url":"https://api.github.com/repos/anchorcms/anchor-cms/issues/795/comments","events_url":"https://api.github.com/repos/anchorcms/anchor-cms/issues/795/events","html_url":"https://github.com/anchorcms/anchor-cms/pull/795","id":52147268,"number":795,"title":"Uncaught exception when Anchor is running on a machine without internet connectivity","user":{"login":"joeinnes","id":4704069,"avatar_url":"https://avatars.githubusercontent.com/u/4704069?v=3","gravatar_id":"","url":"https://api.github.com/users/joeinnes","html_url":"https://github.com/joeinnes","followers_url":"https://api.github.com/users/joeinnes/followers","following_url":"https://api.github.com/users/joeinnes/following{/other_user}","gists_url":"https://api.github.com/users/joeinnes/gists{/gist_id}","starred_url":"https://api.github.com/users/joeinnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joeinnes/subscriptions","organizations_url":"https://api.github.com/users/joeinnes/orgs","repos_url":"https://api.github.com/users/joeinnes/repos","events_url":"https://api.github.com/users/joeinnes/events{/privacy}","received_events_url":"https://api.github.com/users/joeinnes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-12-16T18:13:26Z","updated_at":"2015-01-20T09:45:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/anchorcms/anchor-cms/pulls/795","html_url":"https://github.com/anchorcms/anchor-cms/pull/795","diff_url":"https://github.com/anchorcms/anchor-cms/pull/795.diff","patch_url":"https://github.com/anchorcms/anchor-cms/pull/795.patch"},"body":"Fixes issue #794: uncaught exception when Anchor is running on a machine without internet connectivity.\r\n\r\nAfter installing Anchor, the website loads, and the admin login interface is fine, but when I try to log into the admin panel, there's an uncaught exception error. I believe this to be due to a lack of error handling if there is no network connectivity.\r\n\r\nThis normally would not be an issue on a production box, but a dev box running in a VM or as a standalone may not have an internet connection.\r\n\r\nUncaught Exception\r\n\r\nfile_get_contents(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution\r\n\r\nOrigin\r\n\r\nanchor/libraries/update.php on line 55\r\n\r\nTrace\r\n\r\n#0 [internal function]: System\\Error::native(2, 'file_get_conten...', '/var/www/public...', 55, Array)\r\n#1 /var/www/public/anchor/libraries/update.php(55): file_get_contents('http://anchorcm...', false, Resource id #2)\r\n#2 /var/www/public/anchor/libraries/update.php(18): Update::touch()\r\n#3 /var/www/public/anchor/libraries/update.php(8): Update::setup()\r\n#4 /var/www/public/anchor/routes/admin.php(54): Update::version()\r\n#5 [internal function]: {closure}()\r\n#6 /var/www/public/system/route.php(152): call_user_func_array(Object(Closure), Array)\r\n#7 /var/www/public/system/router.php(152): System\\Route->run()\r\n#8 /var/www/public/system/start.php(36): System\\Router->dispatch()\r\n#9 /var/www/public/index.php(33): require('/var/www/public...')\r\n#10 {main}"},"comment":{"url":"https://api.github.com/repos/anchorcms/anchor-cms/issues/comments/70628296","html_url":"https://github.com/anchorcms/anchor-cms/pull/795#issuecomment-70628296","issue_url":"https://api.github.com/repos/anchorcms/anchor-cms/issues/795","id":70628296,"user":{"login":"CraigChilds94","id":660195,"avatar_url":"https://avatars.githubusercontent.com/u/660195?v=3","gravatar_id":"","url":"https://api.github.com/users/CraigChilds94","html_url":"https://github.com/CraigChilds94","followers_url":"https://api.github.com/users/CraigChilds94/followers","following_url":"https://api.github.com/users/CraigChilds94/following{/other_user}","gists_url":"https://api.github.com/users/CraigChilds94/gists{/gist_id}","starred_url":"https://api.github.com/users/CraigChilds94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CraigChilds94/subscriptions","organizations_url":"https://api.github.com/users/CraigChilds94/orgs","repos_url":"https://api.github.com/users/CraigChilds94/repos","events_url":"https://api.github.com/users/CraigChilds94/events{/privacy}","received_events_url":"https://api.github.com/users/CraigChilds94/received_events","type":"User","site_admin":false},"created_at":"2015-01-20T09:45:38Z","updated_at":"2015-01-20T09:45:38Z","body":"Yes please, sorry we're all super busy at the moment but as soon as we get the time we'll take a look at all of these PR's"}}