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

Enhance informational Error message for the case of headers already sent #249

Merged
merged 3 commits into from
May 30, 2023

Conversation

MiguelAxcar
Copy link
Contributor

@MiguelAxcar MiguelAxcar commented May 29, 2023

This code update enhances the error message displayed by the plugin when it is unable to perform its intended functionality due to headers already being sent.

The default original error message was:
"session_set_save_handler(): Session save handler cannot be changed after headers have already been sent"
and it has been transformed into a more user-friendly and informative message.

The updated error message helps users understand that the plugin was unable to work properly and provides insight into the cause, such as PHP throwing errors, the case that happened for me.

By improving the error message, users can better troubleshoot and resolve the issue instead of thinking that wp-native-php-sessions plugin falied.

This code update enhances the error message displayed by the plugin when it is unable to perform its intended functionality due to headers already being sent. The original error message was "_session_set_save_handler(): Session save handler cannot be changed after headers have already been sent_" has been transformed into a more user-friendly and informative message. The updated error message helps users understand that the plugin was unable to work properly and provides insight into the cause, such as PHP throwing errors, the case that happened for me. By improving the error message, users can better troubleshoot and resolve the issue instead of thinking that wp-native-php-sessions plugin falied.
@MiguelAxcar MiguelAxcar requested a review from a team as a code owner May 29, 2023 19:08
pantheon-sessions.php Outdated Show resolved Hide resolved
pantheon-sessions.php Outdated Show resolved Hide resolved
jazzsequence
jazzsequence previously approved these changes May 30, 2023
Copy link
Contributor

@jazzsequence jazzsequence left a comment

Choose a reason for hiding this comment

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

LGTM. Made a couple minor fixes to spacing and added the textdomain to the __().

@jazzsequence jazzsequence changed the base branch from main to develop May 30, 2023 14:22
@jazzsequence jazzsequence dismissed their stale review May 30, 2023 14:22

The base branch was changed.

@jazzsequence
Copy link
Contributor

Next time, please make sure to branch from develop, rather than main. Thanks for the contribution @MiguelAxcar!

@jazzsequence jazzsequence merged commit 072f7cb into pantheon-systems:develop May 30, 2023
@MiguelAxcar MiguelAxcar deleted the patch-1 branch May 30, 2023 18:06
jspellman814 pushed a commit that referenced this pull request Jun 1, 2023
jazzsequence pushed a commit that referenced this pull request Jun 1, 2023
* update contrib.md and version number

* use correct pr number

* fix lint error introduced in #249
pwtyler pushed a commit that referenced this pull request Jun 1, 2023
…ent (#249)

* Enhance informational Error message for the case of headers already sent

This code update enhances the error message displayed by the plugin when it is unable to perform its intended functionality due to headers already being sent. The original error message was "_session_set_save_handler(): Session save handler cannot be changed after headers have already been sent_" has been transformed into a more user-friendly and informative message. The updated error message helps users understand that the plugin was unable to work properly and provides insight into the cause, such as PHP throwing errors, the case that happened for me. By improving the error message, users can better troubleshoot and resolve the issue instead of thinking that wp-native-php-sessions plugin falied.

* Add textdomain & fix spacing

* fix spacing

---------

Co-authored-by: Chris Reynolds <[email protected]>
pwtyler pushed a commit that referenced this pull request Jun 1, 2023
* update contrib.md and version number

* use correct pr number

* fix lint error introduced in #249
@pwtyler pwtyler mentioned this pull request Jun 1, 2023
pwtyler pushed a commit that referenced this pull request Jun 1, 2023
…ent (#249)

* Enhance informational Error message for the case of headers already sent

This code update enhances the error message displayed by the plugin when it is unable to perform its intended functionality due to headers already being sent. The original error message was "_session_set_save_handler(): Session save handler cannot be changed after headers have already been sent_" has been transformed into a more user-friendly and informative message. The updated error message helps users understand that the plugin was unable to work properly and provides insight into the cause, such as PHP throwing errors, the case that happened for me. By improving the error message, users can better troubleshoot and resolve the issue instead of thinking that wp-native-php-sessions plugin falied.

* Add textdomain & fix spacing

* fix spacing

---------

Co-authored-by: Chris Reynolds <[email protected]>
pwtyler pushed a commit that referenced this pull request Jun 1, 2023
* update contrib.md and version number

* use correct pr number

* fix lint error introduced in #249
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.

2 participants