{"action":"created","issue":{"url":"https://api.github.com/repos/XeroAPI/XeroOAuth-PHP/issues/9","labels_url":"https://api.github.com/repos/XeroAPI/XeroOAuth-PHP/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/XeroAPI/XeroOAuth-PHP/issues/9/comments","events_url":"https://api.github.com/repos/XeroAPI/XeroOAuth-PHP/issues/9/events","html_url":"https://github.com/XeroAPI/XeroOAuth-PHP/issues/9","id":24021110,"number":9,"title":"Not creating $this->request_params for POST requests in curlit() was breaking OAuth signature","user":{"login":"schmoove","id":1321541,"avatar_url":"https://avatars.githubusercontent.com/u/1321541?v=3","gravatar_id":"","url":"https://api.github.com/users/schmoove","html_url":"https://github.com/schmoove","followers_url":"https://api.github.com/users/schmoove/followers","following_url":"https://api.github.com/users/schmoove/following{/other_user}","gists_url":"https://api.github.com/users/schmoove/gists{/gist_id}","starred_url":"https://api.github.com/users/schmoove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schmoove/subscriptions","organizations_url":"https://api.github.com/users/schmoove/orgs","repos_url":"https://api.github.com/users/schmoove/repos","events_url":"https://api.github.com/users/schmoove/events{/privacy}","received_events_url":"https://api.github.com/users/schmoove/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2013-12-10T08:58:37Z","updated_at":"2015-08-10T20:41:06Z","closed_at":"2014-09-29T01:03:54Z","body":"I was receiving the following warnings doing a POST to /Invoices, which was returning a 401 Invalid Signature from the API:\r\n\r\n```\r\n\r\nA PHP Error was encountered\r\n\r\nSeverity: Warning\r\n\r\nMessage: Illegal string offset 'xml'\r\n\r\nFilename: libraries/XeroOAuth.php\r\n\r\nLine Number: 303\r\nA PHP Error was encountered\r\n\r\nSeverity: Warning\r\n\r\nMessage: Invalid argument supplied for foreach()\r\n\r\nFilename: libraries/XeroOAuth.php\r\n\r\nLine Number: 329\r\nA PHP Error was encountered\r\n\r\nSeverity: Warning\r\n\r\nMessage: implode(): Invalid arguments passed\r\n\r\nFilename: libraries/XeroOAuth.php\r\n\r\nLine Number: 332\r\n```\r\n\r\nthese pointed to the empty POST method switch on Line 226:\r\n```\r\ncase 'POST':\r\n\r\n    break;\r\n```\r\n\r\nSimply creating the empty array, ala: \r\n```\r\ncase 'POST':\r\n    $this->request_params = array();\r\n    break;\r\n```\r\n\r\n(or better yet before the switch on 225) fixed the issue, but I am wondering why this whole block was left empty???"},"comment":{"url":"https://api.github.com/repos/XeroAPI/XeroOAuth-PHP/issues/comments/129599896","html_url":"https://github.com/XeroAPI/XeroOAuth-PHP/issues/9#issuecomment-129599896","issue_url":"https://api.github.com/repos/XeroAPI/XeroOAuth-PHP/issues/9","id":129599896,"user":{"login":"brettflorio","id":34131,"avatar_url":"https://avatars.githubusercontent.com/u/34131?v=3","gravatar_id":"","url":"https://api.github.com/users/brettflorio","html_url":"https://github.com/brettflorio","followers_url":"https://api.github.com/users/brettflorio/followers","following_url":"https://api.github.com/users/brettflorio/following{/other_user}","gists_url":"https://api.github.com/users/brettflorio/gists{/gist_id}","starred_url":"https://api.github.com/users/brettflorio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brettflorio/subscriptions","organizations_url":"https://api.github.com/users/brettflorio/orgs","repos_url":"https://api.github.com/users/brettflorio/repos","events_url":"https://api.github.com/users/brettflorio/events{/privacy}","received_events_url":"https://api.github.com/users/brettflorio/received_events","type":"User","site_admin":false},"created_at":"2015-08-10T20:41:06Z","updated_at":"2015-08-10T20:41:06Z","body":"@schmoove Thanks for reporting this, and @ronanq thanks for fixing this one. Just ran into it while modifying our integration to make multiple requests. Updating to the latest code fixes it."}}