carbon-fields icon indicating copy to clipboard operation
carbon-fields copied to clipboard

Invalid values being put into notoptions cache

Open WPprodigy opened this issue 2 years ago • 0 comments

Hello,

This code is pretty faulty: https://github.com/htmlburger/carbon-fields/blob/47f1538cca6cd2860d1b37a040a42c59eb798d76/core/Datastore/Theme_Options_Datastore.php#L60-L62

Notably, WordPress core only ever puts values of true into this cache key: https://github.com/WordPress/WordPress/blob/29c16a48ec21427ba5299fb4c2d7c4749ae3337b/wp-includes/option.php#L210-L211.

Admittedly I'm not very sure what the intent of all this abstraction is, but could it please either use true as a value for when it's adding to notoptions, else unset the item from the array entirely?

WPprodigy avatar Jul 27 '23 20:07 WPprodigy