[wp-hackers] Nasty get_option()/get_settings() bug

Matt Mullenweg m at mullenweg.com
Wed Jan 11 19:53:37 GMT 2006

Mark Jaquith wrote:
> I was thinking about having wp_cache_get() return NULL for values not in 
> the option cache, so that FALSE can mean FALSE, as it would if you had 
> queried the database for the option... but I'm open to suggestions.

There are so many funky bugs related to NULL/FALSE in PHP I would almost 
have a "magic" reserved value that means the option doesn't exist or 
bring back an array like we had before as David pointed out.

Part of the problem is some options might not get loaded until later due 
to the autoload setting. Fundamentally we're doing two things with 
options: storing settings needed all the time and also using it as a 
generic "stuff dump."

Matt Mullenweg
  http://photomatt.net | http://wordpress.org
http://pingomatic.com | http://akismet.com

More information about the wp-hackers mailing list