diff options
author | msquare <msquare@notrademark.de> | 2016-10-04 17:58:56 +0200 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2016-10-04 17:58:56 +0200 |
commit | 42144ed21cbc7361857b375d719ec53b24314546 (patch) | |
tree | ea8c80aa429e6bc1009a1372c3e4ddddf086932a /includes/pages/guest_login.php | |
parent | eec10ebfc5c14ab9b72d3b81b7d44a2e507f5473 (diff) |
move static access to datetime parse function
Diffstat (limited to 'includes/pages/guest_login.php')
-rw-r--r-- | includes/pages/guest_login.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/pages/guest_login.php b/includes/pages/guest_login.php index 1f1b7ab2..9f688321 100644 --- a/includes/pages/guest_login.php +++ b/includes/pages/guest_login.php @@ -104,8 +104,8 @@ function guest_register() { $msg .= error(sprintf(_("Your password is too short (please use at least %s characters)."), MIN_PASSWORD_LENGTH), true); } - if (isset($_REQUEST['planned_arrival_date']) && DateTime::createFromFormat("Y-m-d", trim($_REQUEST['planned_arrival_date']))) { - $planned_arrival_date = DateTime::createFromFormat("Y-m-d", trim($_REQUEST['planned_arrival_date']))->getTimestamp(); + if (isset($_REQUEST['planned_arrival_date']) && $tmp = parse_date("Y-m-d", $_REQUEST['planned_arrival_date'])) { + $planned_arrival_date = $tmp; } else { $valid = false; $msg .= error(_("Please enter your planned date of arrival."), true); |