Skip to content

Fix "Body should be a JSON Array" issue - #48

Merged
pilot merged 1 commit into
KnpLabs:masterfrom
InventisPMTest:master
Sep 13, 2013
Merged

pilot merged 1 commit into
KnpLabs:masterfrom
InventisPMTest:master

Conversation

@InventisPMTest

Copy link
Copy Markdown

The pull request http://github.com/KnpLabs/php-github-api/pull/40 fixed some issues with empty parameters, but caused a regression on other functionalities (see URL for a more detailed explanation).

This modification only forces JSON-objects to be generated when the parameters are empty. This should fix the newly created issues as well as not regress the fix for the previous issue.

@pilotmoon

Copy link
Copy Markdown

This fix is working for me too. I came here because of the regression to issue creation.

@shanem

shanem commented May 16, 2013

Copy link
Copy Markdown

Fix works for me, too. Please merge.

@sagotsky

Copy link
Copy Markdown

Me too. Is this in a tag yet?

@gquemener

Copy link
Copy Markdown
Contributor

Might be a silly question, but how could it be relevant to test $parameters emptiness when we already test that its size is > 0 the line before?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add space before "?" please empty($parameters)? JSON_FORCE_OBJECT

@pilot

pilot commented Sep 1, 2013

Copy link
Copy Markdown
Contributor

@gquemener it's correct here, just wait @InventisPMTest to apply CS fix before merge

pilot added a commit that referenced this pull request Sep 13, 2013
Fix "Body should be a JSON Array" issue
@pilot
pilot merged commit f0fc4e0 into KnpLabs:master Sep 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants