[wp-hackers] WP option set bug (or at least discrepancy)
wordpress at tekartist.org
Thu Apr 3 15:39:55 GMT 2008
There's a nasty discrepancy between the core codebase and the codex in
regards to the update_option() function.
In the above docs, the advertised params are :
But in the code (wp-includes/functions.php), the specs actually are
The main issue with this is that (as far as I know), everybody uses
update_option over add_option, since the docs (and code) states:
"This function can be called even if the option does not exist, the
function will create the option. ".
It's an immediate issue for me that gonna be a big drag, because I now
need to check if the option exists, then use add or update, since I
need to set the autoload flag.
Not the end of the world, but I thought I'd mention it before editing
the codex page.
Is there something I'm missing?!?
Stephane Daury - http://tekartist.org/
More information about the wp-hackers