XeroOAuth-PHP icon indicating copy to clipboard operation
XeroOAuth-PHP copied to clipboard

Bug: Array Merge Fails when doing a GET request because Parameters is not set

Open andrewmfraser opened this issue 10 years ago • 1 comments

In lines https://github.com/XeroAPI/XeroOAuth-PHP/blob/master/lib/XeroOAuth.php#L388-434

Because $params isn't set (if it's a POST request $params['xml'] is set) the try statement fails. This is because array_merge on https://github.com/XeroAPI/XeroOAuth-PHP/blob/master/lib/XeroOAuth.php#L429 is trying to merge an empty $params instead of an array.

It looks like you recently changed this because all I did was make 'useauth' part of $params again and it fixed it on https://github.com/XeroAPI/XeroOAuth-PHP/blob/master/lib/XeroOAuth.php#L389

andrewmfraser avatar Apr 29 '15 12:04 andrewmfraser

Put in a pull request with the fix.

elliotchance avatar Apr 29 '15 23:04 elliotchance