{"action":"closed","issue":{"url":"https://api.github.com/repos/osclass/Osclass/issues/2130","repository_url":"https://api.github.com/repos/osclass/Osclass","labels_url":"https://api.github.com/repos/osclass/Osclass/issues/2130/labels{/name}","comments_url":"https://api.github.com/repos/osclass/Osclass/issues/2130/comments","events_url":"https://api.github.com/repos/osclass/Osclass/issues/2130/events","html_url":"https://github.com/osclass/Osclass/issues/2130","id":209442432,"number":2130,"title":"osc_get_preference() cast type issue","user":{"login":"dev-101","id":5383059,"avatar_url":"https://avatars0.githubusercontent.com/u/5383059?v=3","gravatar_id":"","url":"https://api.github.com/users/dev-101","html_url":"https://github.com/dev-101","followers_url":"https://api.github.com/users/dev-101/followers","following_url":"https://api.github.com/users/dev-101/following{/other_user}","gists_url":"https://api.github.com/users/dev-101/gists{/gist_id}","starred_url":"https://api.github.com/users/dev-101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dev-101/subscriptions","organizations_url":"https://api.github.com/users/dev-101/orgs","repos_url":"https://api.github.com/users/dev-101/repos","events_url":"https://api.github.com/users/dev-101/events{/privacy}","received_events_url":"https://api.github.com/users/dev-101/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-02-22T12:38:54Z","updated_at":"2017-03-21T09:39:30Z","closed_at":"2017-03-21T09:39:30Z","body":"Hi,\r\n\r\nI have noticed that osc_get_preference() always returns type of value as a string, even if we set the type to BOOLEAN in the osc_set_preference().\r\n\r\nThe reason why I am opening this issue is because of one strange problem that happened on one server from a client, inverse (!) logic was not working as expected, although the string value returned was empty (\"\") and so I had to change the logic to check for string value == \"\" (or == \"1\" or != \"\") instead using (!) in front like a bool. Again, really puzzled by this, as I could not reproduce the problem on my end, and also no one else complained (so far).\r\n\r\n`update`: now when I think about this, maybe the problem was not related to the type, but return context, again no errors on my servers were shown and everything worked as expected.\r\n\r\nShould we cast the BOOLEAN type preference values to (bool) in the core?\r\nThanks\r\n\r\n"}}
{"actor":{"display_login":"conejoninja"}}