Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed response type to be application/json per #10 #11

Merged
merged 2 commits into from Jan 29, 2014
Merged

changed response type to be application/json per #10 #11

merged 2 commits into from Jan 29, 2014

Conversation

0verbyte
Copy link
Contributor

No description provided.

@@ -57,5 +59,6 @@
$final .= ']';

echo($final);
?>
Copy link
Contributor

Choose a reason for hiding this comment

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

From a best-practices perspective the ?> tag is occasionally problematic and shouldn't be used unless strictly necessary (i.e. literal output follows it). It shouldn't cause a lot a issues in a project like this but this one line is an example of a case where the semantics are subtly changed because of the following two empty lines. Yes, those two empty lines probably shouldn't be there (they weren't doing anything in the original file), but the more robust solution is to simply not use ?>.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@commonquail thanks for explaining this, it makes sense. I've just always used the closing tag ?> in my php development.

@tariqbuilds tariqbuilds merged commit 3931119 into tariqbuilds:master Jan 29, 2014
@tariqbuilds
Copy link
Owner

I merged in your PR. Thanks @voidPirate .

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.

None yet

3 participants