{"action":"created","issue":{"url":"https://api.github.com/repos/aces/Loris/issues/3854","repository_url":"https://api.github.com/repos/aces/Loris","labels_url":"https://api.github.com/repos/aces/Loris/issues/3854/labels{/name}","comments_url":"https://api.github.com/repos/aces/Loris/issues/3854/comments","events_url":"https://api.github.com/repos/aces/Loris/issues/3854/events","html_url":"https://github.com/aces/Loris/pull/3854","id":345306822,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0NDkzNTc0","number":3854,"title":"[Database] Change return type of pselectOne to null","user":{"login":"ridz1208","id":15268287,"node_id":"MDQ6VXNlcjE1MjY4Mjg3","avatar_url":"https://avatars3.githubusercontent.com/u/15268287?v=4","gravatar_id":"","url":"https://api.github.com/users/ridz1208","html_url":"https://github.com/ridz1208","followers_url":"https://api.github.com/users/ridz1208/followers","following_url":"https://api.github.com/users/ridz1208/following{/other_user}","gists_url":"https://api.github.com/users/ridz1208/gists{/gist_id}","starred_url":"https://api.github.com/users/ridz1208/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ridz1208/subscriptions","organizations_url":"https://api.github.com/users/ridz1208/orgs","repos_url":"https://api.github.com/users/ridz1208/repos","events_url":"https://api.github.com/users/ridz1208/events{/privacy}","received_events_url":"https://api.github.com/users/ridz1208/received_events","type":"User","site_admin":false},"labels":[{"id":152305414,"node_id":"MDU6TGFiZWwxNTIzMDU0MTQ=","url":"https://api.github.com/repos/aces/Loris/labels/Bug%20Fix","name":"Bug Fix","color":"f7c6c7","default":false},{"id":292439222,"node_id":"MDU6TGFiZWwyOTI0MzkyMjI=","url":"https://api.github.com/repos/aces/Loris/labels/Discussion%20Required","name":"Discussion Required","color":"ff99cc","default":false},{"id":708895841,"node_id":"MDU6TGFiZWw3MDg4OTU4NDE=","url":"https://api.github.com/repos/aces/Loris/labels/[branch]%20bugfix","name":"[branch] bugfix","color":"cc9966","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-27T17:29:58Z","updated_at":"2018-07-27T17:30:28Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/aces/Loris/pulls/3854","html_url":"https://github.com/aces/Loris/pull/3854","diff_url":"https://github.com/aces/Loris/pull/3854.diff","patch_url":"https://github.com/aces/Loris/pull/3854.patch"},"body":"This is meant to prevent `pselectOne()` from returning an empty array when the result is not in the database. Given that on success the function is expecting a value, it is less error prone to return null when nothing is return instead of an empty array.\r\n\r\nfunctions `pselectRow()` and `pselect()` already expect an array to be returned and thus can be left as they are.\r\n\r\nThis helps avoid countless errors and warnings of all sorts in the error log when the result of a `pselectOne` is processed without first doing something like\r\n```\r\n$result = $DB->pselectOne(SOMETHING)\r\nif (!is_array($result)) {\r\n    //do what I want to do\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/aces/Loris/issues/comments/408486783","html_url":"https://github.com/aces/Loris/pull/3854#issuecomment-408486783","issue_url":"https://api.github.com/repos/aces/Loris/issues/3854","id":408486783,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODQ4Njc4Mw==","user":{"login":"ridz1208","id":15268287,"node_id":"MDQ6VXNlcjE1MjY4Mjg3","avatar_url":"https://avatars3.githubusercontent.com/u/15268287?v=4","gravatar_id":"","url":"https://api.github.com/users/ridz1208","html_url":"https://github.com/ridz1208","followers_url":"https://api.github.com/users/ridz1208/followers","following_url":"https://api.github.com/users/ridz1208/following{/other_user}","gists_url":"https://api.github.com/users/ridz1208/gists{/gist_id}","starred_url":"https://api.github.com/users/ridz1208/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ridz1208/subscriptions","organizations_url":"https://api.github.com/users/ridz1208/orgs","repos_url":"https://api.github.com/users/ridz1208/repos","events_url":"https://api.github.com/users/ridz1208/events{/privacy}","received_events_url":"https://api.github.com/users/ridz1208/received_events","type":"User","site_admin":false},"created_at":"2018-07-27T17:30:28Z","updated_at":"2018-07-27T17:30:28Z","author_association":"CONTRIBUTOR","body":"@driusan @xlecours how dangerous is this in a bugfix release ??"}}
{"actor":{"display_login":"ridz1208"}}