Allows 0 titles when sanitizing. Props mdawaffe. fixes #5293

git-svn-id: http://svn.automattic.com/wordpress/trunk@6409 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2007-12-19 17:45:50 +00:00
parent d958376904
commit fdebf7ba34
2 changed files with 2 additions and 3 deletions

View File

@ -329,9 +329,8 @@ function sanitize_title($title, $fallback_title = '') {
$title = strip_tags($title);
$title = apply_filters('sanitize_title', $title);
if (empty($title)) {
if ( '' === $title || false === $title )
$title = $fallback_title;
}
return $title;
}

View File

@ -707,7 +707,7 @@ function is_term($term, $taxonomy = '') {
return 0;
$where = $wpdb->prepare( "t.term_id = %d", $term );
} else {
if ( ! $term = sanitize_title($term) )
if ( '' === $term = sanitize_title($term) )
return 0;
$where = $wpdb->prepare( "t.slug = %s", $term );
}