Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Respect JsonResponseHandler flags when false #442

Merged

Conversation

danizord
Copy link
Contributor

Currently, when you explicitly set the flags to false, it behaves as if it were true.

@danizord danizord force-pushed the hotfix/whoops-json-flags branch 2 times, most recently from c9c8d43 to 52cf541 Compare February 11, 2017 18:39
@danizord danizord force-pushed the hotfix/whoops-json-flags branch from 52cf541 to 76d2908 Compare February 11, 2017 18:44
@danizord danizord force-pushed the hotfix/whoops-json-flags branch from 76d2908 to f2b3440 Compare February 11, 2017 18:53
@@ -75,11 +75,11 @@ private function registerJsonHandler(Whoops $whoops, $config)

$handler = new JsonResponseHandler();

if (isset($config['json_exceptions']['show_trace'])) {
if (isset($config['json_exceptions']['show_trace']) && true === $config['json_exceptions']['show_trace']) {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we can have here ! empty? What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure, I think stricter is better :)

Copy link
Member

Choose a reason for hiding this comment

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

! empty is functionally equivalent here, more succinct, and more in line with other similar checks against configuration flags we're doing elsewhere.

@weierophinney weierophinney self-assigned this Feb 13, 2017
@weierophinney weierophinney added this to the 1.1.0 milestone Feb 13, 2017
@weierophinney weierophinney merged commit f2b3440 into zendframework:master Feb 13, 2017
weierophinney added a commit that referenced this pull request Feb 13, 2017
Respect JsonResponseHandler flags when false
weierophinney added a commit that referenced this pull request Feb 13, 2017
weierophinney added a commit that referenced this pull request Feb 13, 2017
@weierophinney
Copy link
Member

Thanks, @danizord!

@danizord danizord deleted the hotfix/whoops-json-flags branch February 13, 2017 18:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants