[wp-trac] [WordPress Trac] #46994: wp_privacy_anonymize_data( 'date' ) uses problematic "zero date" to anonymize

WordPress Trac noreply at wordpress.org
Fri Apr 19 14:10:10 UTC 2019


#46994: wp_privacy_anonymize_data( 'date' ) uses problematic "zero date" to
anonymize
--------------------------+------------------------------
 Reporter:  jrchamp       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Privacy       |     Version:
 Severity:  minor         |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Old description:

> The conversation in #43535 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.

New description:

 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.

--

Comment (by SergeyBiryukov):

 Related: #8857, #26847, #41785.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46994#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list