{"action":"created","issue":{"url":"https://api.github.com/repos/bolt/bolt/issues/5707","repository_url":"https://api.github.com/repos/bolt/bolt","labels_url":"https://api.github.com/repos/bolt/bolt/issues/5707/labels{/name}","comments_url":"https://api.github.com/repos/bolt/bolt/issues/5707/comments","events_url":"https://api.github.com/repos/bolt/bolt/issues/5707/events","html_url":"https://github.com/bolt/bolt/issues/5707","id":173199396,"number":5707,"title":"[BUG] Incorrect ownerid when no user is authenticated","user":{"login":"dhargitai","id":4903405,"avatar_url":"https://avatars.githubusercontent.com/u/4903405?v=3","gravatar_id":"","url":"https://api.github.com/users/dhargitai","html_url":"https://github.com/dhargitai","followers_url":"https://api.github.com/users/dhargitai/followers","following_url":"https://api.github.com/users/dhargitai/following{/other_user}","gists_url":"https://api.github.com/users/dhargitai/gists{/gist_id}","starred_url":"https://api.github.com/users/dhargitai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhargitai/subscriptions","organizations_url":"https://api.github.com/users/dhargitai/orgs","repos_url":"https://api.github.com/users/dhargitai/repos","events_url":"https://api.github.com/users/dhargitai/events{/privacy}","received_events_url":"https://api.github.com/users/dhargitai/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-08-25T13:12:57Z","updated_at":"2016-08-25T13:21:40Z","closed_at":null,"body":"I tried to log some information of a POST request through the `logger.system` in one of my controllers.\r\nWhen there is no user information in the session, the `ownerid` parameter is set to `''` (empty string) in src/Logger/Handler/SystemHandler.php:99\r\nThis is causing an exception when the PDOStatement tried to execute the insert query, because the table definition says that `ownerid` can be a valid integer or NULL.\r\n\r\nThe exception is: `SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'ownerid' at row 1` and it is thrown in vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:91\r\n\r\nDetails\r\n-------\r\n\r\n - Relevant Bolt Version: 2.2 (2.2.23)\r\n - Install type: Composer install\r\n - PHP version: 5.6\r\n - Used web server: Nginx version 1.8.0\r\n\r\n\r\nReproduction\r\n------------\r\n\r\nCreate a new HTTP endpoint in an extension, and try to log anything into the system log without authenticating the actual user. The `ownerid` parameter will be '' and nothing will be logged.\r\n"},"comment":{"url":"https://api.github.com/repos/bolt/bolt/issues/comments/242383390","html_url":"https://github.com/bolt/bolt/issues/5707#issuecomment-242383390","issue_url":"https://api.github.com/repos/bolt/bolt/issues/5707","id":242383390,"user":{"login":"dhargitai","id":4903405,"avatar_url":"https://avatars.githubusercontent.com/u/4903405?v=3","gravatar_id":"","url":"https://api.github.com/users/dhargitai","html_url":"https://github.com/dhargitai","followers_url":"https://api.github.com/users/dhargitai/followers","following_url":"https://api.github.com/users/dhargitai/following{/other_user}","gists_url":"https://api.github.com/users/dhargitai/gists{/gist_id}","starred_url":"https://api.github.com/users/dhargitai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhargitai/subscriptions","organizations_url":"https://api.github.com/users/dhargitai/orgs","repos_url":"https://api.github.com/users/dhargitai/repos","events_url":"https://api.github.com/users/dhargitai/events{/privacy}","received_events_url":"https://api.github.com/users/dhargitai/received_events","type":"User","site_admin":false},"created_at":"2016-08-25T13:21:39Z","updated_at":"2016-08-25T13:21:39Z","body":"Thanks for pointing it out :)\r\nhttps://github.com/bolt/bolt/pull/5708"}}
{"actor":{"display_login":"dhargitai"}}