{"action":"created","issue":{"url":"https://api.github.com/repos/viion/lodestone-php/issues/5","repository_url":"https://api.github.com/repos/viion/lodestone-php","labels_url":"https://api.github.com/repos/viion/lodestone-php/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/viion/lodestone-php/issues/5/comments","events_url":"https://api.github.com/repos/viion/lodestone-php/issues/5/events","html_url":"https://github.com/viion/lodestone-php/issues/5","id":225650400,"number":5,"title":"Random (?) Fatal Errors","user":{"login":"Simbiat","id":6022665,"avatar_url":"https://avatars3.githubusercontent.com/u/6022665?v=3","gravatar_id":"","url":"https://api.github.com/users/Simbiat","html_url":"https://github.com/Simbiat","followers_url":"https://api.github.com/users/Simbiat/followers","following_url":"https://api.github.com/users/Simbiat/following{/other_user}","gists_url":"https://api.github.com/users/Simbiat/gists{/gist_id}","starred_url":"https://api.github.com/users/Simbiat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Simbiat/subscriptions","organizations_url":"https://api.github.com/users/Simbiat/orgs","repos_url":"https://api.github.com/users/Simbiat/repos","events_url":"https://api.github.com/users/Simbiat/events{/privacy}","received_events_url":"https://api.github.com/users/Simbiat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-05-02T10:09:15Z","updated_at":"2017-05-06T12:20:45Z","closed_at":null,"body":"So, I've noticed periodical errors like these:\r\n```php\r\n[Tue May 02 13:01:33.010936 2017] [:error] PHP Warning:  dom_import_simplexml() expects parameter 1 to be object, boolean given in root\\\\backend\\\\Lodestone\\\\Dom\\\\Document.php on line 94, referer: http://192.168.1.5/FFTracker/\r\n[Tue May 02 13:01:33.010936 2017] [:error] PHP Notice:  Trying to get property of non-object in root\\\\backend\\\\Lodestone\\\\Dom\\\\Document.php on line 94, referer: http://192.168.1.5/FFTracker/\r\n[Tue May 02 13:01:33.010936 2017] [:error] PHP Notice:  Trying to get property of non-object in root\\\\backend\\\\Lodestone\\\\Dom\\\\Document.php on line 197, referer: http://192.168.1.5/FFTracker/\r\n[Tue May 02 13:01:33.010936 2017] [:error] PHP Notice:  Trying to get property of non-object in root\\\\backend\\\\Lodestone\\\\Dom\\\\Document.php on line 197, referer: http://192.168.1.5/FFTracker/\r\n[Tue May 02 13:01:33.010936 2017] [:error] PHP Warning:  Invalid argument supplied for foreach() in root\\\\backend\\\\Lodestone\\\\Dom\\\\Document.php on line 197, referer: http://192.168.1.5/FFTracker/\r\n[Tue May 02 13:01:33.010936 2017] [:error] PHP Warning:  dom_import_simplexml() expects parameter 1 to be object, boolean given in root\\\\backend\\\\Lodestone\\\\Dom\\\\Document.php on line 94, referer: http://192.168.1.5/FFTracker/\r\n[Tue May 02 13:01:33.010936 2017] [:error] PHP Notice:  Trying to get property of non-object in root\\\\backend\\\\Lodestone\\\\Dom\\\\Document.php on line 94, referer: http://192.168.1.5/FFTracker/\r\n[Tue May 02 13:01:33.010936 2017] [:error] PHP Fatal error:  Uncaught TypeError: Argument 1 passed to DOMXPath::__construct() must be an instance of DOMDocument, null given in root\\\\backend\\\\Lodestone\\\\Dom\\\\Document.php:156\\nStack trace:\\n#0 root\\\\backend\\\\Lodestone\\\\Dom\\\\Document.php(156): DOMXPath->__construct(NULL)\\n#1 root\\\\backend\\\\Lodestone\\\\Parser\\\\Character.php(56): Lodestone\\\\Dom\\\\Document->find('.frame__chara__...', 0)\\n#2 root\\\\backend\\\\Lodestone\\\\Parser\\\\Character.php(34): Lodestone\\\\Parser\\\\Character->parseProfile()\\n#3 root\\\\backend\\\\fftracker.php(654): Lodestone\\\\Parser\\\\Character->parse()\\n#4 root\\\\backend\\\\fftracker.php(822): lodestone_grab('8499161', true)\\n#5 in root\\\\backend\\\\Lodestone\\\\Dom\\\\Document.php on line 156, referer: http://192.168.1.5/FFTracker/\r\n```\r\nThing is, that when I simply retry the call for the company/member that failed like this - it works as expected. Not sure, but most likely this is caused by some connection issue, maybe it gets error 502 for example or something like that. No idea how to simulate this, too."},"comment":{"url":"https://api.github.com/repos/viion/lodestone-php/issues/comments/299636229","html_url":"https://github.com/viion/lodestone-php/issues/5#issuecomment-299636229","issue_url":"https://api.github.com/repos/viion/lodestone-php/issues/5","id":299636229,"user":{"login":"Simbiat","id":6022665,"avatar_url":"https://avatars3.githubusercontent.com/u/6022665?v=3","gravatar_id":"","url":"https://api.github.com/users/Simbiat","html_url":"https://github.com/Simbiat","followers_url":"https://api.github.com/users/Simbiat/followers","following_url":"https://api.github.com/users/Simbiat/following{/other_user}","gists_url":"https://api.github.com/users/Simbiat/gists{/gist_id}","starred_url":"https://api.github.com/users/Simbiat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Simbiat/subscriptions","organizations_url":"https://api.github.com/users/Simbiat/orgs","repos_url":"https://api.github.com/users/Simbiat/repos","events_url":"https://api.github.com/users/Simbiat/events{/privacy}","received_events_url":"https://api.github.com/users/Simbiat/received_events","type":"User","site_admin":false},"created_at":"2017-05-06T12:20:45Z","updated_at":"2017-05-06T12:20:45Z","body":"Well, for some reason sometimes the returned page is just empty. Like even its $response is. Yet cURL treats is as HTTP 200 for some reason. Either way, I created a pull, that would avoid a fatal error in such cases. I am not entirely sure, but perhaps $this->ensureHtml(); is not required now"}}
{"actor":{"display_login":"Simbiat"}}