[wp-trac] [WordPress Trac] #26798: While inserting a post some values for 'post_date' throw a PHP exception

WordPress Trac noreply at wordpress.org
Thu Jul 14 20:55:16 UTC 2022


#26798: While inserting a post some values for 'post_date' throw a PHP exception
-------------------------------------------------+-------------------------
 Reporter:  mobius5150                           |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Date/Time                            |     Version:  3.5
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests changes-    |     Focuses:
  requested                                      |
-------------------------------------------------+-------------------------

Comment (by johnregan3):

 I discovered some date formats were, in fact, failing (Namely RFC3339 and
 RSS formats), so I simplified the regex being used, and improved the
 validation inside of wp_checkdate().

 Part of the issue with the previous patch was it added validation for
 time, which isn't the emphasis of wp_resolve_post_date() nor
 wp_checkdate(), so I removed that time validation.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/26798#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list