Opened 8 years ago
Closed 8 years ago
#1712 closed defect (bug) (fixed)
Meetings: Add validation for date/time inputs
Reported by: | ocean90 | Owned by: | Otto42 |
---|---|---|---|
Milestone: | Priority: | high | |
Component: | Make (Get Involved) / P2 | Keywords: | needs-patch |
Cc: |
Description
When you enter "20" in the time field the meetings list will produce a fatal error:
Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (2016-05-02 20 GMT) at position 11 (2): Unexpected character' in /home/wporg/public_html/wp-content/plugins/wporg-meeting-posttype/wporg-meeting-posttype.php:119 Stack trace: #0 /home/wporg/public_html/wp-content/plugins/wporg-meeting-posttype/wporg-meeting-posttype.php(119): DateTime->__construct('2016-05-02 20 G...') #1 [internal function]: Meeting_Post_Type->{closure}(Object(WP_Post), 0) #2 /home/wporg/public_html/wp-content/plugins/wporg-meeting-posttype/wporg-meeting-posttype.php(139): array_walk(Array, Object(Closure)) #3 [internal function]: Meeting_Post_Type->meeting_set_next_meeting(Array, Object(WP_Query)) #4 /home/wporg/public_html/wp-includes/plugin.php(291): call_user_func_array(Array, Array) #5 /home/wporg/public_html/wp-includes/query.php(3766): apply_filters_ref_array('the_posts', Array) #6 /home/wporg/public_html/wp-includes/query.php(4010): WP_Query->get_posts() #7 /home/wporg/public_html/wp-inc Timestamp: Mon, 02 May 2016 21:12:48 +0000 (1462223568) File: /home/wporg/public_html/wp-content/plugins/wporg-meeting-posttype/wporg-meeting-posttype.php Line: 119
The error will be in the admin too so you have to fix the meta field via wp-cli.
Change History (3)
Note: See
TracTickets for help on using
tickets.
Fixed in [3173].