[wp-trac] [WordPress Trac] #59360: update_network_option() strict checks can cause false negatives
WordPress Trac
noreply at wordpress.org
Tue Oct 10 14:44:02 UTC 2023
#59360: update_network_option() strict checks can cause false negatives
---------------------------------------------+---------------------------
Reporter: mukesh27 | Owner: spacedmonkey
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 6.4
Component: Options, Meta APIs | Version:
Severity: normal | Resolution:
Keywords: has-unit-tests has-patch commit | Focuses: performance
---------------------------------------------+---------------------------
Comment (by jrf):
Replying to [comment:21 costdev]:
> @jrf Thanks for the report! Can you direct us towards the failures, or a
test that will reproduce the failures so we can investigate?
You can see a failing build here: https://github.com/Yoast/wordpress-
seo/actions/runs/6470608918/job/17567196156
The underlying code which the failures are related to is the
https://github.com/Yoast/wordpress-seo/blob/trunk/inc/options/class-wpseo-
option.php class which ensures that for select options, the values are
stable, i.e. the values are arrays and the class makes sure that if any of
the expected array keys are missing from the option, they get added with a
default value to make sure that all code in the plugin which relies on the
option can always count on all keys being available and set.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59360#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list