This repository has been archived by the owner on Jan 31, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure setting save_path considers save_handler
The fix in #99, while correct, did not address setting the session.save_path for non-files save handlers when the save handler is set via `setOption('save_handler', $value)`. The reason for this was due to the fact that `setOption()` delegates directly to `setStorageOption()` instead of the relevant class method; the changes in #99 make that method a no-op in the case of a save handler option. What this patch does is two-fold: - It overrides `setOption()` and has it call `setPhpSaveHandler()` if `save_handler` is provided as the `$option` argument. It then returns on completion. Otherwise, it delegates to the parent. - It modifies `setPhpSaveHandler()` to extract the bulk of the logic to a new method, `performSaveHandlerUpdate()`. This new method now returns the save handler _name_ to store. `setPhpSaveHandler()` then sets that name as the `save_handler` value in the `$options` property before returning. I have added a test to verify this behavior based on an example provided in #98.
- Loading branch information
1 parent
96da246
commit e52b095
Showing
2 changed files
with
126 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters