mirror of
git://develop.git.wordpress.org/
synced 2025-01-18 05:18:42 +01:00
Allows 0 titles when sanitizing. Props mdawaffe. fixes #5293
git-svn-id: https://develop.svn.wordpress.org/trunk@6409 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d8876f4dba
commit
e715ba1cd0
@ -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