Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#4695 closed defect (bug) (fixed)

pre_option_{option_name} filter does not work if returned value evaluates as false

Reported by: markjaquith Owned by:
Milestone: 2.3 Priority: normal
Severity: normal Version: 2.2.1
Component: General Keywords: filter pre_option_
Focuses: Cc:


update_option('blog_public', '1');

function return_zero($option_val) {
	return 0;

add_filter('pre_option_blog_public', 'return_zero');


Expected result is:

string(1) "0"

Actual result is:

string(0) "1"

Patch is on the way.

Change History (1)

#1 @markjaquith
13 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [5842]) Allow pre_option_ filters to return values that evaluate as false. fixes #4695

Note: See TracTickets for help on using tickets.