WordPress.org

Make WordPress Core

Ticket #5293: 5293.diff

File 5293.diff, 869 bytes (added by mdawaffe, 12 years ago)
  • wp-includes/formatting.php

     
    323323        $title = strip_tags($title);
    324324        $title = apply_filters('sanitize_title', $title);
    325325
    326         if (empty($title)) {
     326        if ( '' === $title || false === $title )
    327327                $title = $fallback_title;
    328         }
    329328
    330329        return $title;
    331330}
  • wp-includes/taxonomy.php

     
    699699                        return 0;
    700700                $where = $wpdb->prepare( "t.term_id = %d", $term );
    701701        } else {
    702                 if ( ! $term = sanitize_title($term) )
     702                if ( '' === $term = sanitize_title($term) )
    703703                        return 0;
    704704                $where = $wpdb->prepare( "t.slug = %s", $term );
    705705        }