Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#16070 closed defect (bug) (duplicate)

Invalid SQL dates used by Wordpress

Reported by: undid's profile undid Owned by:
Milestone: Priority: normal
Severity: critical Version: 3.0.4
Component: Database Keywords: date, sql, invalid
Focuses: Cc:

Description

It seems that Wordpress is using invalid SQL dates sometimes.

For example, in the file wp-includes/post.php, line 2233 :

$post_date_gmt = '0000-00-00 00:00:00';

Depending on the SGBD it won't work because it is an invalid SQL date (this date cannot exist in the DATETIME format). The minimum date we can use is '1753-01-01 00:00:00', or 1970-01-01 depending on the implementation.

If we use for example MariaDB 5.1, equivalent to MySQL 5.1 (but without the MySQL bugs), with wordpress, this will lead to an error.

I think there is another files where such a value for datetime is used.

Change History (1)

#1 @filosofo
14 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #8857

Note: See TracTickets for help on using tickets.