WordPress.org

Make WordPress Core

Opened 18 months ago

Closed 18 months ago

Last modified 18 months ago

#46994 closed defect (bug) (wontfix)

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

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

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
18 months ago

  • Description modified (diff)

Related: #8857, #26847, #41785.

#2 in reply to: ↑ 1 @jrchamp
18 months ago

  • Resolution set to wontfix
  • Status changed from new to 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
18 months ago

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