[wp-trac] [WordPress Trac] #21989: update_option() calls sanitize_option() twice when option does not exist
WordPress Trac
noreply at wordpress.org
Fri Dec 8 16:14:04 UTC 2017
#21989: update_option() calls sanitize_option() twice when option does not exist
-------------------------------------------------+-------------------------
Reporter: MikeSchinkel | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future
Component: Options, Meta APIs | Release
Severity: normal | Version:
Keywords: dev-feedback has-patch needs- | Resolution:
testing needs-refresh | Focuses:
-------------------------------------------------+-------------------------
Comment (by Andy Schmidt):
Replying to [comment:20 dd32]:
Just want to document MY scenario that was impacted by this bug.
I was validating the correctness path to an external code base before
storing that permanently as the "new" location.
So I first confirmed a syntactically valid relative path, then the actual
existence of a certain file there, then (in an overabundance of caution)
had a try/catch with an "include" of that new codebase path followed by a
function call. Can you tell - I didn't want to switch to a non-working
path?
Spent days trying to figure out which of my hooks/actions/filters/timing
etc. might cause the "include" to have happened previously somewhere
earlier in my code, before I stumbled across this bug report.
Maybe the incident count is so low because it's so far-fetched and hard to
pin-point; most people would just have to give up early and eliminate
their (perfectly functioning!) code.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/21989#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list