09.3 invalid DOB 问题

转自 https://issues.joomla.org/tracker/joomla-cms/8093

在修改生日时,不可以设置未来的日子,DOB就是 Date of Birth,得设成1988年5月12日而不是2018年5月12日。

(不小心暴露年龄了)

在网上查询相关解释时,没有中文注释,特此备注。

以下为原文:

[#8093] - Invalid DOB on user registration results in 500 error upon redirect, instead of successful redirect and display of validation error

Steps to reproduce the issue

  • Require Date of Birth (DOB) on User Profile
  • Attempt to Register a user using an invalid date for the DOB - ex: 1970-13-13

Expected result

  • Registration will fail, redirecting back to the registration form and showing the DOB validation error"Registration failed: The date of birth you entered is invalid. Please enter valid date."(PLG_USER_PROFILE_ERROR_INVALID_DOB)

Actual result

  • Instead, the redirect fails on the invalid date, resulting in a 500 error page showing"DateTime::__construct(): Failed to parse time string (1970-13-13) at position 6 (3): Unexpected character"

System information (as much as possible)

  • PHP 5.5.0RC3
  • MySQL 5.5.32

Additional comments

  • Should be trivial for someone else to try to reproduce and confirm or deny

猜你喜欢

转载自blog.csdn.net/weixin_41755681/article/details/80249162