{"action":"closed","issue":{"url":"https://api.github.com/repos/olamedia/nokogiri/issues/15","labels_url":"https://api.github.com/repos/olamedia/nokogiri/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/olamedia/nokogiri/issues/15/comments","events_url":"https://api.github.com/repos/olamedia/nokogiri/issues/15/events","html_url":"https://github.com/olamedia/nokogiri/issues/15","id":72858860,"number":15,"title":"Call to undefined method DOMNodeList::hasChildNodes()","user":{"login":"bookin","id":537882,"avatar_url":"https://avatars.githubusercontent.com/u/537882?v=3","gravatar_id":"","url":"https://api.github.com/users/bookin","html_url":"https://github.com/bookin","followers_url":"https://api.github.com/users/bookin/followers","following_url":"https://api.github.com/users/bookin/following{/other_user}","gists_url":"https://api.github.com/users/bookin/gists{/gist_id}","starred_url":"https://api.github.com/users/bookin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bookin/subscriptions","organizations_url":"https://api.github.com/users/bookin/orgs","repos_url":"https://api.github.com/users/bookin/repos","events_url":"https://api.github.com/users/bookin/events{/privacy}","received_events_url":"https://api.github.com/users/bookin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-03T20:14:52Z","updated_at":"2015-05-24T16:32:46Z","closed_at":"2015-05-24T16:32:46Z","body":"Думаю что это ошибка, но не разбирался особо. \r\nДергаю ``` $nokogiri->get('#login')->toText(); ```\r\nПолучаю ошибку - ```Call to undefined method DOMNodeList::hasChildNodes()```\r\nПоизучал код, думаю проблема решается если добавить ```|| $node instanceof DOMNodeList ``` в строку 261, в условие метода ```protected function _toTextArray()```\r\n```php\r\nprotected function _toTextArray($node = null, $skipChildren = false, $singleLevel = true){\r\n        $array = array();\r\n        if ($node === null || $node instanceof DOMNodeList ){\r\n            if ($this->_dom instanceof DOMNodeList){\r\n                foreach ($this->_dom as $node){\r\n                    if ($singleLevel){\r\n                        $array = array_merge($array, $this->_toTextArray($node, $skipChildren, $singleLevel));\r\n                    }else{\r\n                        $array[] = $this->_toTextArray($node, $skipChildren, $singleLevel);\r\n                    }\r\n                }\r\n                return $array;\r\n            }\r\n            $node = $this->getDom();\r\n        }\r\n...\r\n```"}}