WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 5 years ago

#2148 closed defect (bug) (fixed)

mysql5 with strict causes time/date errors

Reported by: Podz Owned by:
Milestone: Priority: normal
Severity: major Version: 2.0
Component: General Keywords:
Focuses: Cc:

Description

From #wordpress:
Dec 24 19:03:16 <Podz> rboren, this correct ? if ( $sVersion{0} == 5 ) $wpdb->query('set sql_mode="STRICT_ALL_TABLES";');
Dec 24 19:03:30 <rboren> Yes, I believe so.
Dec 24 19:03:33 <Podz> it's from the link you gave me
Dec 24 19:03:44 <masquerade> Podz, use [] around the 0 instead, {} has been removed from PHP5
Dec 24 19:03:44 <Podz> okay - the draft i have does not disappear, but
Dec 24 19:03:45 <rboren> Also: http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html
Dec 24 19:05:24 <Podz> The time is correct in options, but the post preview is generating errors. Xampp or code I have no clue:
Dec 24 19:05:25 <Podz> Warning: date() [function.date]: Windows does not support dates prior to midnight (00:00:00), January 1, 1970 in C:\Program Files\xampp\htdocs\wordpress\wp-includes\functions.php on line 26
Dec 24 19:06:33 <rboren> Curious, that's on a call to date().
Dec 24 19:08:49 <rboren> Podz: Does it still occur when strict mode is disabled?
Dec 24 19:08:59 <Podz> hang on
Dec 24 19:10:04 <Podz> it does, yes - when i deactivate that plugin

Dec 24 19:10:51 <rboren> Podz: I think you have to forcefully set it back to .
Dec 24 19:11:07 <Podz> okay
Dec 24 19:12:02 <Podz> if ( $sVersion[0] == 5 ) $wpdb->query('set sql_mode="";'); and the error persists.
Dec 24 19:12:35 <rboren> Okay. This is during a save and continue?
Dec 24 19:13:12 <Podz> this is a draft
Dec 24 19:13:52 <Podz> and save and continue

I'm sure this will look butt-ugly when I click Submit ...

Change History (4)

comment:1 @Podz9 years ago

From #wordpress:

Dec 24 19:03:16 <Podz> rboren, this correct ? if ( $sVersion{0} == 5 ) $wpdb->query('set sql_mode="STRICT_ALL_TABLES";');

Dec 24 19:03:30 <rboren> Yes, I believe so.

Dec 24 19:03:33 <Podz> it's from the link you gave me

Dec 24 19:03:44 <masquerade> Podz, use [] around the 0 instead, {} has been removed from PHP5

Dec 24 19:03:44 <Podz> okay - the draft i have does not disappear, but

Dec 24 19:03:45 <rboren> Also: http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html

Dec 24 19:05:24 <Podz> The time is correct in options, but the post preview is generating errors. Xampp or code I have no clue:

Dec 24 19:05:25 <Podz> Warning: date() [function.date]: Windows does not support dates prior to midnight (00:00:00), January 1, 1970 in C:\Program Files\xampp\htdocs\wordpress\wp-includes\functions.php on line 26

Dec 24 19:06:33 <rboren> Curious, that's on a call to date().

Dec 24 19:08:49 <rboren> Podz: Does it still occur when strict mode is disabled?

Dec 24 19:08:59 <Podz> hang on Dec 24 19:10:04 <Podz> it does, yes - when i deactivate that plugin

Dec 24 19:10:51 <rboren> Podz: I think you have to forcefully set it back to .

Dec 24 19:11:07 <Podz> okay Dec 24 19:12:02 <Podz> if ( $sVersion[0] == 5 ) $wpdb->query('set sql_mode="";'); and the error persists.

Dec 24 19:12:35 <rboren> Okay. This is during a save and continue?

Dec 24 19:13:12 <Podz> this is a draft

Dec 24 19:13:52 <Podz> and save and continue

I'm sure this will look butt-ugly when I click Submit ... trying again...

comment:2 @ryan9 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [3359]) Make sure we have a valid timestamp. fixes #2148

comment:3 @anonymous8 years ago

  • Milestone 2.0 deleted

Milestone 2.0 deleted

comment:5 @dd325 years ago

  • Milestone Unassigned deleted
Note: See TracTickets for help on using tickets.