Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#46994 closed defect (bug) (wontfix)

wp_privacy_anonymize_data( 'date' ) uses problematic "zero date" to anonymize

Reported by: jrchamp Owned by:
Priority: normal Milestone:
Component: Privacy Version:
Severity: minor Keywords:
Cc: Focuses:

Description (last modified by SergeyBiryukov)

The conversation in #43545 seems like it should have resulted in a default like '1970-01-01 00:00:01' to match the minimal valid value of TIMESTAMP. Instead, it uses the "special zero date" 0000-00-00 00:00:00 which generates an error with the default strict modes in MySQL 5.7 and MySQL 8.0. I'd also be fine with null, but I acknowledge that tables may be set to disallow null.

Change History (3)

#1 follow-up: @SergeyBiryukov
7 years ago

  • Description modified (diff)

Related: #8857, #26847, #41785.

#2 in reply to: ↑ 1 @jrchamp
7 years ago

  • Resolution → wontfix
  • Status new → closed

Replying to SergeyBiryukov:

Related: #8857, #26847, #41785.

Thanks Sergey! I was wondering what I had missed and did not expect that WordPress had decided to alter the server's SQL mode to deactivate the zero date restrictions.

I'll close it then to match. Hopefully that's the right thing to do. Feel free to override if it's not right.

#3 @desrosj
7 years ago

  • Milestone Awaiting Review
Note: See TracTickets for help on using tickets.