mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 19:46:21 +00:00
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:
parent
d958376904
commit
fdebf7ba34
@ -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;
|
||||
}
|
||||
|
@ -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 );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user