{"action":"closed","number":1043,"pull_request":{"url":"https://api.github.com/repos/magento/magento2/pulls/1043","id":29343125,"html_url":"https://github.com/magento/magento2/pull/1043","diff_url":"https://github.com/magento/magento2/pull/1043.diff","patch_url":"https://github.com/magento/magento2/pull/1043.patch","issue_url":"https://api.github.com/repos/magento/magento2/issues/1043","number":1043,"state":"closed","locked":false,"title":"Bug fix for issue 1035","user":{"login":"tim-reynolds","id":1260709,"avatar_url":"https://avatars.githubusercontent.com/u/1260709?v=3","gravatar_id":"","url":"https://api.github.com/users/tim-reynolds","html_url":"https://github.com/tim-reynolds","followers_url":"https://api.github.com/users/tim-reynolds/followers","following_url":"https://api.github.com/users/tim-reynolds/following{/other_user}","gists_url":"https://api.github.com/users/tim-reynolds/gists{/gist_id}","starred_url":"https://api.github.com/users/tim-reynolds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tim-reynolds/subscriptions","organizations_url":"https://api.github.com/users/tim-reynolds/orgs","repos_url":"https://api.github.com/users/tim-reynolds/repos","events_url":"https://api.github.com/users/tim-reynolds/events{/privacy}","received_events_url":"https://api.github.com/users/tim-reynolds/received_events","type":"User","site_admin":false},"body":"https://github.com/magento/magento2/issues/1035\r\n\r\nA bug in the appendChild method of Magento\\Framework\\Simplexml\\Element.php causes values to be lost in very specific cases. This will fix it. The existing unit test for appendChild has been updated as well.\r\n\r\nBug: When appending a node that has an attribute and no child nodes, the code will take the code path for having children. This is because the result of $source->children() evaluates to TRUE when a node has attributes and no children.\r\nExample: \r\n```php\r\n$root = simplexml_load_string('<root/>', 'Magento\\Framework\\Simplexml\\Element');\r\n$append = simplexml_load_string('<child attr=\"abc\">Text</child>', 'Magento\\Framework\\Simplexml\\Element');\r\n$root->appendChild($append);\r\necho $root->asNiceXml();\r\n```\r\nShould output:\r\n```xml\r\n<root>\r\n    <child attr=\"abc\">Text</child>\r\n</root>\r\n```\r\nActually outputs:\r\n```xml\r\n<root>\r\n    <child attr=\"abc\" />\r\n</root>\r\n```\r\n\r\nFix: Changing to call from [children()] to [count()] fixes the issue.","created_at":"2015-02-15T23:14:17Z","updated_at":"2015-03-06T18:01:46Z","closed_at":"2015-03-06T18:01:46Z","merged_at":"2015-03-06T18:01:46Z","merge_commit_sha":"0db61981104359195079b3607a30e57db31d890e","assignee":{"login":"anupdugar","id":1619607,"avatar_url":"https://avatars.githubusercontent.com/u/1619607?v=3","gravatar_id":"","url":"https://api.github.com/users/anupdugar","html_url":"https://github.com/anupdugar","followers_url":"https://api.github.com/users/anupdugar/followers","following_url":"https://api.github.com/users/anupdugar/following{/other_user}","gists_url":"https://api.github.com/users/anupdugar/gists{/gist_id}","starred_url":"https://api.github.com/users/anupdugar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anupdugar/subscriptions","organizations_url":"https://api.github.com/users/anupdugar/orgs","repos_url":"https://api.github.com/users/anupdugar/repos","events_url":"https://api.github.com/users/anupdugar/events{/privacy}","received_events_url":"https://api.github.com/users/anupdugar/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/magento/magento2/pulls/1043/commits","review_comments_url":"https://api.github.com/repos/magento/magento2/pulls/1043/comments","review_comment_url":"https://api.github.com/repos/magento/magento2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/magento/magento2/issues/1043/comments","statuses_url":"https://api.github.com/repos/magento/magento2/statuses/4a92a6495f36561fae912e0dd96010fe1a925d83","head":{"label":"tim-reynolds:Issue-1035-SimpleXMLElementBug","ref":"Issue-1035-SimpleXMLElementBug","sha":"4a92a6495f36561fae912e0dd96010fe1a925d83","user":{"login":"tim-reynolds","id":1260709,"avatar_url":"https://avatars.githubusercontent.com/u/1260709?v=3","gravatar_id":"","url":"https://api.github.com/users/tim-reynolds","html_url":"https://github.com/tim-reynolds","followers_url":"https://api.github.com/users/tim-reynolds/followers","following_url":"https://api.github.com/users/tim-reynolds/following{/other_user}","gists_url":"https://api.github.com/users/tim-reynolds/gists{/gist_id}","starred_url":"https://api.github.com/users/tim-reynolds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tim-reynolds/subscriptions","organizations_url":"https://api.github.com/users/tim-reynolds/orgs","repos_url":"https://api.github.com/users/tim-reynolds/repos","events_url":"https://api.github.com/users/tim-reynolds/events{/privacy}","received_events_url":"https://api.github.com/users/tim-reynolds/received_events","type":"User","site_admin":false},"repo":{"id":4275330,"name":"magento2","full_name":"tim-reynolds/magento2","owner":{"login":"tim-reynolds","id":1260709,"avatar_url":"https://avatars.githubusercontent.com/u/1260709?v=3","gravatar_id":"","url":"https://api.github.com/users/tim-reynolds","html_url":"https://github.com/tim-reynolds","followers_url":"https://api.github.com/users/tim-reynolds/followers","following_url":"https://api.github.com/users/tim-reynolds/following{/other_user}","gists_url":"https://api.github.com/users/tim-reynolds/gists{/gist_id}","starred_url":"https://api.github.com/users/tim-reynolds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tim-reynolds/subscriptions","organizations_url":"https://api.github.com/users/tim-reynolds/orgs","repos_url":"https://api.github.com/users/tim-reynolds/repos","events_url":"https://api.github.com/users/tim-reynolds/events{/privacy}","received_events_url":"https://api.github.com/users/tim-reynolds/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tim-reynolds/magento2","description":"Magento 2 is currently at development stage. The information contained herein is subject to change without notice and is not warranted to be error-free. The software and documentation provided WITHOUT ANY WARRANTY and it is NOT intended for commercial applications and may be used at your own risk. ","fork":true,"url":"https://api.github.com/repos/tim-reynolds/magento2","forks_url":"https://api.github.com/repos/tim-reynolds/magento2/forks","keys_url":"https://api.github.com/repos/tim-reynolds/magento2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tim-reynolds/magento2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tim-reynolds/magento2/teams","hooks_url":"https://api.github.com/repos/tim-reynolds/magento2/hooks","issue_events_url":"https://api.github.com/repos/tim-reynolds/magento2/issues/events{/number}","events_url":"https://api.github.com/repos/tim-reynolds/magento2/events","assignees_url":"https://api.github.com/repos/tim-reynolds/magento2/assignees{/user}","branches_url":"https://api.github.com/repos/tim-reynolds/magento2/branches{/branch}","tags_url":"https://api.github.com/repos/tim-reynolds/magento2/tags","blobs_url":"https://api.github.com/repos/tim-reynolds/magento2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tim-reynolds/magento2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tim-reynolds/magento2/git/refs{/sha}","trees_url":"https://api.github.com/repos/tim-reynolds/magento2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tim-reynolds/magento2/statuses/{sha}","languages_url":"https://api.github.com/repos/tim-reynolds/magento2/languages","stargazers_url":"https://api.github.com/repos/tim-reynolds/magento2/stargazers","contributors_url":"https://api.github.com/repos/tim-reynolds/magento2/contributors","subscribers_url":"https://api.github.com/repos/tim-reynolds/magento2/subscribers","subscription_url":"https://api.github.com/repos/tim-reynolds/magento2/subscription","commits_url":"https://api.github.com/repos/tim-reynolds/magento2/commits{/sha}","git_commits_url":"https://api.github.com/repos/tim-reynolds/magento2/git/commits{/sha}","comments_url":"https://api.github.com/repos/tim-reynolds/magento2/comments{/number}","issue_comment_url":"https://api.github.com/repos/tim-reynolds/magento2/issues/comments{/number}","contents_url":"https://api.github.com/repos/tim-reynolds/magento2/contents/{+path}","compare_url":"https://api.github.com/repos/tim-reynolds/magento2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tim-reynolds/magento2/merges","archive_url":"https://api.github.com/repos/tim-reynolds/magento2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tim-reynolds/magento2/downloads","issues_url":"https://api.github.com/repos/tim-reynolds/magento2/issues{/number}","pulls_url":"https://api.github.com/repos/tim-reynolds/magento2/pulls{/number}","milestones_url":"https://api.github.com/repos/tim-reynolds/magento2/milestones{/number}","notifications_url":"https://api.github.com/repos/tim-reynolds/magento2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tim-reynolds/magento2/labels{/name}","releases_url":"https://api.github.com/repos/tim-reynolds/magento2/releases{/id}","created_at":"2012-05-09T18:50:42Z","updated_at":"2015-02-15T22:01:07Z","pushed_at":"2015-02-15T23:07:56Z","git_url":"git://github.com/tim-reynolds/magento2.git","ssh_url":"git@github.com:tim-reynolds/magento2.git","clone_url":"https://github.com/tim-reynolds/magento2.git","svn_url":"https://github.com/tim-reynolds/magento2","homepage":"http://www.magento.com","size":165569,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"magento:develop","ref":"develop","sha":"8352a97e5bcb8610f18579c0b4528cdaeb95d188","user":{"login":"magento","id":168457,"avatar_url":"https://avatars.githubusercontent.com/u/168457?v=3","gravatar_id":"","url":"https://api.github.com/users/magento","html_url":"https://github.com/magento","followers_url":"https://api.github.com/users/magento/followers","following_url":"https://api.github.com/users/magento/following{/other_user}","gists_url":"https://api.github.com/users/magento/gists{/gist_id}","starred_url":"https://api.github.com/users/magento/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magento/subscriptions","organizations_url":"https://api.github.com/users/magento/orgs","repos_url":"https://api.github.com/users/magento/repos","events_url":"https://api.github.com/users/magento/events{/privacy}","received_events_url":"https://api.github.com/users/magento/received_events","type":"Organization","site_admin":false},"repo":{"id":2884111,"name":"magento2","full_name":"magento/magento2","owner":{"login":"magento","id":168457,"avatar_url":"https://avatars.githubusercontent.com/u/168457?v=3","gravatar_id":"","url":"https://api.github.com/users/magento","html_url":"https://github.com/magento","followers_url":"https://api.github.com/users/magento/followers","following_url":"https://api.github.com/users/magento/following{/other_user}","gists_url":"https://api.github.com/users/magento/gists{/gist_id}","starred_url":"https://api.github.com/users/magento/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magento/subscriptions","organizations_url":"https://api.github.com/users/magento/orgs","repos_url":"https://api.github.com/users/magento/repos","events_url":"https://api.github.com/users/magento/events{/privacy}","received_events_url":"https://api.github.com/users/magento/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/magento/magento2","description":"All Submissions you make to Magento, an eBay Inc. company (“Magento”) through GitHub are subject to the following terms and conditions: (1)\tYou grant Magento a perpetual, worldwide, non-exclusive, no charge, royalty free, irrevocable      license under your applicable copyrights and patents to reproduce, prepare derivative works of, display, publically perform, sublicense and distribute any feedback, ideas, code, or other information (“Submission”) you submit through GitHub. (2)\tYour Submission is an original work of authorship and you are the owner or are legally entitled to grant the license stated above. (3)\tYou agree to the Contributor License Agreement found here:  https://github.com/magento/magento2/blob/master/CONTRIBUTOR_LICENSE_AGREEMENT.html","fork":false,"url":"https://api.github.com/repos/magento/magento2","forks_url":"https://api.github.com/repos/magento/magento2/forks","keys_url":"https://api.github.com/repos/magento/magento2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/magento/magento2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/magento/magento2/teams","hooks_url":"https://api.github.com/repos/magento/magento2/hooks","issue_events_url":"https://api.github.com/repos/magento/magento2/issues/events{/number}","events_url":"https://api.github.com/repos/magento/magento2/events","assignees_url":"https://api.github.com/repos/magento/magento2/assignees{/user}","branches_url":"https://api.github.com/repos/magento/magento2/branches{/branch}","tags_url":"https://api.github.com/repos/magento/magento2/tags","blobs_url":"https://api.github.com/repos/magento/magento2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/magento/magento2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/magento/magento2/git/refs{/sha}","trees_url":"https://api.github.com/repos/magento/magento2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/magento/magento2/statuses/{sha}","languages_url":"https://api.github.com/repos/magento/magento2/languages","stargazers_url":"https://api.github.com/repos/magento/magento2/stargazers","contributors_url":"https://api.github.com/repos/magento/magento2/contributors","subscribers_url":"https://api.github.com/repos/magento/magento2/subscribers","subscription_url":"https://api.github.com/repos/magento/magento2/subscription","commits_url":"https://api.github.com/repos/magento/magento2/commits{/sha}","git_commits_url":"https://api.github.com/repos/magento/magento2/git/commits{/sha}","comments_url":"https://api.github.com/repos/magento/magento2/comments{/number}","issue_comment_url":"https://api.github.com/repos/magento/magento2/issues/comments{/number}","contents_url":"https://api.github.com/repos/magento/magento2/contents/{+path}","compare_url":"https://api.github.com/repos/magento/magento2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/magento/magento2/merges","archive_url":"https://api.github.com/repos/magento/magento2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/magento/magento2/downloads","issues_url":"https://api.github.com/repos/magento/magento2/issues{/number}","pulls_url":"https://api.github.com/repos/magento/magento2/pulls{/number}","milestones_url":"https://api.github.com/repos/magento/magento2/milestones{/number}","notifications_url":"https://api.github.com/repos/magento/magento2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/magento/magento2/labels{/name}","releases_url":"https://api.github.com/repos/magento/magento2/releases{/id}","created_at":"2011-11-30T15:30:13Z","updated_at":"2015-03-06T14:17:18Z","pushed_at":"2015-03-06T18:01:45Z","git_url":"git://github.com/magento/magento2.git","ssh_url":"git@github.com:magento/magento2.git","clone_url":"https://github.com/magento/magento2.git","svn_url":"https://github.com/magento/magento2","homepage":"http://www.magento.com","size":385835,"stargazers_count":2151,"watchers_count":2151,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1176,"mirror_url":null,"open_issues_count":192,"forks":1176,"open_issues":192,"watchers":2151,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/magento/magento2/pulls/1043"},"html":{"href":"https://github.com/magento/magento2/pull/1043"},"issue":{"href":"https://api.github.com/repos/magento/magento2/issues/1043"},"comments":{"href":"https://api.github.com/repos/magento/magento2/issues/1043/comments"},"review_comments":{"href":"https://api.github.com/repos/magento/magento2/pulls/1043/comments"},"review_comment":{"href":"https://api.github.com/repos/magento/magento2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/magento/magento2/pulls/1043/commits"},"statuses":{"href":"https://api.github.com/repos/magento/magento2/statuses/4a92a6495f36561fae912e0dd96010fe1a925d83"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"mage2-team","id":1229310,"avatar_url":"https://avatars.githubusercontent.com/u/1229310?v=3","gravatar_id":"","url":"https://api.github.com/users/mage2-team","html_url":"https://github.com/mage2-team","followers_url":"https://api.github.com/users/mage2-team/followers","following_url":"https://api.github.com/users/mage2-team/following{/other_user}","gists_url":"https://api.github.com/users/mage2-team/gists{/gist_id}","starred_url":"https://api.github.com/users/mage2-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mage2-team/subscriptions","organizations_url":"https://api.github.com/users/mage2-team/orgs","repos_url":"https://api.github.com/users/mage2-team/repos","events_url":"https://api.github.com/users/mage2-team/events{/privacy}","received_events_url":"https://api.github.com/users/mage2-team/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":1,"additions":3,"deletions":3,"changed_files":2}}