Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #35795, comment 2


Ignore:
Timestamp:
02/11/2016 04:11:11 AM (9 years ago)
Author:
boonebgorges
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35795, comment 2

    initial v1  
    11I think you've actually understated the problem. Not only do keys get double-slashed when `update_metadata()` falls back on `add_metadata()`, but also when `update_metadata()` does its "has anything changed?" check by calling `get_metadata()`.
    22
    3 Until such time as the slashing mess is cleared up, these functions should be reworked so that two copies of `$meta_key` are kept internally: one that is unslashed (this is the one used for database queries), and one that is not-unslashed (this is the one used to pass to other meta API functions, and - I think - in cache keys and when concatenating filter/action names). This change should be supported by copious tests.
     3Until such time as the slashing mess is cleared up, these functions should be reworked so that two copies of `$meta_key` are kept internally: one that is unslashed (this is the one used for database queries), and one that is not-unslashed (this is the one used to pass to other meta API functions). This change should be supported by copious tests.