﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	focuses	prnumber
48363	Empty string in database for boolean meta not cast to false	chrisvanpatten	kadamwhite	"In WordPress 5.3 RC1, when registering post meta as a boolean and saving a {{{false}}} value via the REST API, it is persisted to the database as an empty string, but the empty string is not cast back to {{{false}}} on output, and is instead rendered in the API as {{{null}}}.

{{{
<?php

register_meta(
	'post',
	'my_meta_key',
	[
		'type'         => 'boolean',
		'single'       => true,
		'show_in_rest' => true,
	]
);
}}}

Expected in API:

{{{
...
""meta"": {
    ""my_meta_key"": false
}
...
}}}

Actual:

{{{
...
""meta"": {
    ""my_meta_key"": null
}
...
}}}"	defect (bug)	closed	normal	5.3	REST API	5.3	normal	fixed	has-unit-tests has-patch commit dev-reviewed		rest-api	
