Skip to content
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.

If display_errors is FALSE exception messages are still printed to the screen #168

Merged
merged 9 commits into from
Aug 31, 2015

Conversation

johanjanssens
Copy link
Member

resolve #163

- Ensure the exception code is a valid HTTP status code, if not revert to '500'.
- If display_errors is off, use the formal HTTP status message instead of the custom exception message to prevent system information leaking to the output.
- Add 'code' parameter. Default to the exception code.
- Add 'message' parameter. Default to the exception message.
- Ensure the exception code is a valid HTTP status code, if not revert to '500'.
 - If display_errors is off, use the formal HTTP status message instead of the custom exception message to prevent system information leaking to the output.
@johanjanssens johanjanssens added this to the 1.0 milestone Jun 30, 2015
}

// Exit immediatly if we are in a CLI environment
if (PHP_SAPI == 'cli')
Copy link
Member

Choose a reason for hiding this comment

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

before the condition was !$document, I'd keep it in addition to PHP_SAPI check. Otherwise this might break in json, xml etc where JDocument returns null.

Copy link
Member Author

Choose a reason for hiding this comment

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

@ercanozkaya Agreed.

johanjanssens added a commit that referenced this pull request Aug 31, 2015
If display_errors is FALSE exception messages are still printed to the screen
@johanjanssens johanjanssens merged commit 1de7b95 into develop Aug 31, 2015
@johanjanssens johanjanssens deleted the feature/163-displayerrors branch August 31, 2015 20:59
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.

2 participants