[wp-trac] [WordPress Trac] #44215: Personal data exports - Empty values are included in the report
WordPress Trac
noreply at wordpress.org
Fri Aug 17 15:56:11 UTC 2018
#44215: Personal data exports - Empty values are included in the report
-------------------------------------------------+-------------------------
Reporter: bor0 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
| Review
Component: Privacy | Version: 4.9.6
Severity: normal | Resolution:
Keywords: has-patch has-screenshots 2nd- | Focuses:
opinion |
-------------------------------------------------+-------------------------
Changes (by desrosj):
* keywords: has-patch has-screenshots 2nd-opinion close => has-patch has-
screenshots 2nd-opinion
Comment:
Did some testing. Here are my findings of the current behaviors in core.
The fields currently included in a data export are core user fields, a few
core user meta fields, and core comment fields. All of these are either
varchars, int/bigints, or text types.
- Passing `false` as a meta value results in an empty string being stored.
- Passing a `0` integer as a meta value results in a `0` string being
stored.
All values for these fields are passed through `if ( ! empty( $value ) )`
before adding the data to the export. This means that in the current
state, any empty field (which indicates an absence of data) will always be
removed from the export. This should probably be changed.
If the meta key exists, it potentially means something and should be
displayed in the export, even if empty. Users, for example, may have an
empty description, last name, or nickname field. Comments may have an
empty author URL or Author IP. It could be important for the user to know
that those fields are present and are in fact empty.
If a core user meta field has been deleted, a PHP notice is currently
thrown. Example: A plugin deletes the `last_name` meta field for a user.
When this happens, the field can be excluded from the report because it
does not exist.
Incoming patch with these changes.
Worth noting, only the behavior in core's data exporters can be
controlled. Plugins with custom data exporters will have their own logic
about what to include and why. I think that the plugin handbook pages
about creating data exporters should be updated to include a section about
the differences between no data and empty data.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44215#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list