Make WordPress Core

Ticket #27489: taxonomy.php.patch

File taxonomy.php.patch, 655 bytes (added by jackreichert, 12 years ago)

patch to fix bug

  • wp-includes/taxonomy.php

    diff --git wp-includes/taxonomy.php wp-includes/taxonomy.php
    index 410e762..5e8222b 100644
    function get_taxonomy( $taxonomy ) {  
    218218 * @return bool Whether the taxonomy exists.
    219219 */
    220220function taxonomy_exists( $taxonomy ) {
     221    if ( ! is_string( $taxonomy ) )
     222        return false;
     223
    221224        global $wp_taxonomies;
    222225
    223226        return isset( $wp_taxonomies[$taxonomy] );
    function wp_check_term_hierarchy_for_loops( $parent, $term_id, $taxonomy ) {  
    34053408                wp_update_term( $loop_member, $taxonomy, array( 'parent' => 0 ) );
    34063409
    34073410        return $parent;
    3408 }
    3409  No newline at end of file
     3411}