[wp-meta] [Making WordPress.org] #1712: Meetings: Add validation for date/time inputs

Making WordPress.org noreply at wordpress.org
Mon May 16 20:40:02 UTC 2016


#1712: Meetings: Add validation for date/time inputs
-------------------------------------+-------------------------
 Reporter:  ocean90                  |      Owner:
     Type:  defect                   |     Status:  new
 Priority:  high                     |  Milestone:
Component:  make.wordpress.org / P2  |   Keywords:  needs-patch
-------------------------------------+-------------------------
 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.

--
Ticket URL: <https://meta.trac.wordpress.org/ticket/1712>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list