[wp-trac] [WordPress Trac] #4695: pre_option_{option_name} filter
does not work if returned value evaluates as false
WordPress Trac
wp-trac at lists.automattic.com
Thu Aug 2 22:37:48 GMT 2007
#4695: pre_option_{option_name} filter does not work if returned value evaluates
as false
-------------------------+--------------------------------------------------
Reporter: markjaquith | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.3 (trunk)
Component: General | Version: 2.2.1
Severity: normal | Keywords: filter pre_option_
-------------------------+--------------------------------------------------
{{{
<?php
require_once('wp-config.php');
update_option('blog_public', '1');
function return_zero($option_val) {
return 0;
}
add_filter('pre_option_blog_public', 'return_zero');
var_dump(get_option('blog_public'));
?>
}}}
Expected result is:
{{{
string(1) "0"
}}}
Actual result is:
{{{
string(0) "1"
}}}
Patch is on the way.
--
Ticket URL: <http://trac.wordpress.org/ticket/4695>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list