[wp-trac] [WordPress Trac] #43913: On sending the personal data export email, the request should be marked COMPLETED

WordPress Trac noreply at wordpress.org
Mon May 7 11:06:06 UTC 2018


#43913: On sending the personal data export email, the request should be marked
COMPLETED
-------------------------------------------------+-------------------------
 Reporter:  allendav                             |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  4.9.6
Component:  General                              |     Version:  trunk
 Severity:  normal                               |  Resolution:
 Keywords:  gdpr has-patch needs-testing has-    |     Focuses:
  unit-tests                                     |
-------------------------------------------------+-------------------------
Changes (by birgire):

 * keywords:  gdpr has-patch needs-testing needs-unit-tests => gdpr has-
     patch needs-testing has-unit-tests


Comment:

 The [attachment:43913.2.diff] patch:

 - Adds tests.
 - Fixes a typo in the docblock (succes -> success).
 - Adjusts the description of the docblock (current timestamp instead of
 datetime).
 - Adjusts the docblock according to the *Coding Standard*.

 ps: In general I'm not sure if we should allow a negative ID, by using
 {{{absint()}}}. That seems like an invalid input?


 ----

 Also just want to mention that
 {{{_wp_user_request_completed_timestamp()}}}, without an input argument,
 triggers a PHP warning, as expected.

 Here's an example:

 {{{
 function some_function( $arg ) {
 }

 some_function();

 }}}

 In PHP 7.2:

 {{{
 <b>Fatal error</b>:  Uncaught ArgumentCountError: Too few arguments to
 function some_function(), 0 passed in [...][...] on line 5 and exactly 1
 expected in [...][...]:2
 Stack trace:
 #0 [...][...](5): some_function()
 #1 {main}
   thrown in <b>[...][...]</b> on line <b>2</b><br />

 }}}

 In PHP 5.6:

 {{{
 <b>Warning</b>:  Missing argument 1 for some_function(), called in
 [...][...] on line 5 and defined in <b>[...][...]</b> on line <b>2</b><br
 />
 <br />
 <b>Warning</b>:  Missing argument 1 for some_function(), called in
 [...][...] on line 8 and defined in <b>[...][...]</b> on line <b>2</b><br
 />

 }}}

 This can be fixed with e.g.

 {{{
 function some_function( $arg = null ) {
 }
 }}}

 I couldn't find what's preferred in general in core, but both cases are
 used.

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


More information about the wp-trac mailing list