forked from modxcms/revolution
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix User Date of Birth Validation and Processing (modxcms#16620)
### What does it do? Replace usage of `strtotime` with `DateTimeImmutable::createFromFormat` for better format compatibility. ### Why is it needed? Certain date formats, such as m-d-Y, are incompatible with `strtotime` and will cause the value of input fields where it's currently used (such as in a User's Profile) to fail. ### How to test Set the system setting `manager_date_format` to `m-d-Y` (or any other format where the month and day would be programmatically ambiguous), clear caches, and verify that a User's DOB can be added/updated as expected. Note that there are two distinct places to check this: under Manage/Users/[User] and via the logged in User's Profile page (at `/manager/?a=security/profile`) ### Related issue(s)/PR(s) n/a
- Loading branch information
Showing
2 changed files
with
88 additions
and
71 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