Prevent blank pages on session errors #20

Merged
Aaron merged 2 commits from session-errors into master 2020-12-30 20:05:29 +01:00
Member
  • Invoke Dispatcher::kickGuest from Session for invalid sessions.
  • Register ErrorHandler before Session start.

Previously, a NotAllowedException would be thrown if an invalid session was encountered. However, these exceptions were not caught, and hence would yield a fatal uncaught exception error.

At this point in Kabuki, the ErrorHandler class has not been registered yet for error handling purposes. This error is therefore not visible if the PHP ini directive 'display_errors' is set to 'Off'. As this is the default production value, the script would fail with a blank page in such cases.

* Invoke Dispatcher::kickGuest from Session for invalid sessions. * Register ErrorHandler before Session start. Previously, a NotAllowedException would be thrown if an invalid session was encountered. However, these exceptions were not caught, and hence would yield a fatal uncaught exception error. At this point in Kabuki, the ErrorHandler class has not been registered yet for error handling purposes. This error is therefore not visible if the PHP ini directive 'display_errors' is set to 'Off'. As this is the default production value, the script would fail with a blank page in such cases.
Roflin approved these changes 2020-12-30 19:51:29 +01:00
Aaron merged commit 2885e24456 into master 2020-12-30 20:05:29 +01:00
Aaron deleted branch session-errors 2020-12-30 20:05:33 +01:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Public/pics#20
No description provided.