[wp-trac] [WordPress Trac] #7230: The 0th of July
WordPress Trac
wp-trac at lists.automattic.com
Thu Jul 3 03:55:57 GMT 2008
#7230: The 0th of July
------------------------+---------------------------------------------------
Reporter: tellyworth | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.5.2
Component: General | Version:
Severity: normal | Keywords:
------------------------+---------------------------------------------------
It's possible to enter a post date with a zero on the write post page. WP
doesn't validate the date, and unless MySQL is running in strict mode the
invalid date will get stored in the post_date column.
Steps to reproduce:
1. New Post
2. Edit the timestamp
3. Change the day field to "00"
4. Publish
5. Click the View Post link
Expected: WP should validate the date and change it to something that
works.
Actual: the post is published but the permalink is 404 because of a quirk
in the way get_permalink() handles the post_date field.
The steps to reproduce assume MySQL is not running in strict mode, I
haven't tested that case. Reproduced in trunk, it probably affects all
versions.
--
Ticket URL: <http://trac.wordpress.org/ticket/7230>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list