From 380033a6730a22aa2d6af2bd8bd8a968bc39e088 Mon Sep 17 00:00:00 2001 From: matt Date: Mon, 28 Nov 2005 10:21:23 +0000 Subject: [PATCH] Allow 0 for postmeta, fixes #1912 git-svn-id: http://svn.automattic.com/wordpress/trunk@3221 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin-functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index 82377d0ee8..bda12934bb 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -869,7 +869,7 @@ function add_meta($post_ID) { $metakeyinput = $wpdb->escape(stripslashes(trim($_POST['metakeyinput']))); $metavalue = $wpdb->escape(stripslashes(trim($_POST['metavalue']))); - if (!empty ($metavalue) && ((('#NONE#' != $metakeyselect) && !empty ($metakeyselect)) || !empty ($metakeyinput))) { + if ( ('0' === $metavalue || !empty ($metavalue)) && ((('#NONE#' != $metakeyselect) && !empty ($metakeyselect)) || !empty ($metakeyinput)) ) { // We have a key/value pair. If both the select and the // input for the key have data, the input takes precedence: