{"action":"created","issue":{"url":"https://api.github.com/repos/ady624/webCoRE/issues/21","repository_url":"https://api.github.com/repos/ady624/webCoRE","labels_url":"https://api.github.com/repos/ady624/webCoRE/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/ady624/webCoRE/issues/21/comments","events_url":"https://api.github.com/repos/ady624/webCoRE/issues/21/events","html_url":"https://github.com/ady624/webCoRE/issues/21","id":245930273,"number":21,"title":"Issue with integer comparison in switch","user":{"login":"tinypocket","id":9200698,"avatar_url":"https://avatars0.githubusercontent.com/u/9200698?v=4","gravatar_id":"","url":"https://api.github.com/users/tinypocket","html_url":"https://github.com/tinypocket","followers_url":"https://api.github.com/users/tinypocket/followers","following_url":"https://api.github.com/users/tinypocket/following{/other_user}","gists_url":"https://api.github.com/users/tinypocket/gists{/gist_id}","starred_url":"https://api.github.com/users/tinypocket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tinypocket/subscriptions","organizations_url":"https://api.github.com/users/tinypocket/orgs","repos_url":"https://api.github.com/users/tinypocket/repos","events_url":"https://api.github.com/users/tinypocket/events{/privacy}","received_events_url":"https://api.github.com/users/tinypocket/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-07-27T05:33:22Z","updated_at":"2017-08-14T23:58:51Z","closed_at":null,"body":"This stopped working after a recent update/publish.  You can see in the logs & the screenshot that there is an apparent bug when comparing integers: \"Comparison (integer) 1 is (integer) 1 = false (3ms)\"\r\n![image](https://user-images.githubusercontent.com/9200698/28655692-566fe9a2-7252-11e7-92ee-79b3720ae8e2.png)\r\n\r\nWhich refers to the switch statement below:\r\n\r\n![image](https://user-images.githubusercontent.com/9200698/28655618-dcfd8584-7251-11e7-8ffc-786631926a43.png)\r\n"},"comment":{"url":"https://api.github.com/repos/ady624/webCoRE/issues/comments/322341607","html_url":"https://github.com/ady624/webCoRE/issues/21#issuecomment-322341607","issue_url":"https://api.github.com/repos/ady624/webCoRE/issues/21","id":322341607,"user":{"login":"ady624","id":5341982,"avatar_url":"https://avatars2.githubusercontent.com/u/5341982?v=4","gravatar_id":"","url":"https://api.github.com/users/ady624","html_url":"https://github.com/ady624","followers_url":"https://api.github.com/users/ady624/followers","following_url":"https://api.github.com/users/ady624/following{/other_user}","gists_url":"https://api.github.com/users/ady624/gists{/gist_id}","starred_url":"https://api.github.com/users/ady624/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ady624/subscriptions","organizations_url":"https://api.github.com/users/ady624/orgs","repos_url":"https://api.github.com/users/ady624/repos","events_url":"https://api.github.com/users/ady624/events{/privacy}","received_events_url":"https://api.github.com/users/ady624/received_events","type":"User","site_admin":false},"created_at":"2017-08-14T23:58:51Z","updated_at":"2017-08-14T23:58:51Z","body":"Ok, the issue is with the DTH and there is also an issue with webCoRE. 49 is ASCII code for 1. 50 means 2. So there are two issues causing this:\r\n\r\n1. DTH sends the character “1” instead of the number 1\r\n2. webCoRE does not correctly parse the switch value as integer (though it suggests it is comparing it as such)\r\n\r\nI can fix #2 and that will inherently fix the problem - ie accepting both strings and integers"}}
{"actor":{"display_login":"ady624"}}