Opened 5 months ago
#61762 new defect (bug)
Options can be incorrectly cached following database errors.
Reported by: | peterwilsoncc | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Options, Meta APIs | Keywords: | |
Focuses: | Cc: |
Description
Various wpdb
methods can return falsey values to indicate one of two things:
0
: zero effected rowsfalse
: a database error
In get_option()
, get_network_option()
, delete_option()
and delete_network_option()
the results of the database query are imprecisely checked and can result in populated the notoptions
cache incorrectly. Either by adding to the cache following a database error, or not adding to the cache when the zero rows are effected while deleting an option.
In add_network_option()
, update_network_option()
the notoptions
cache is cleared prior to the database query without accounting for database errors. (This simply causes additional queries rather than incorrect data being returned.)
Related #61484, props @bjorsch for picking up.
Note: See
TracTickets for help on using
tickets.